Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:18
elixir-hex
0002-Further-add-missing-to_string-in-backtrack...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0002-Further-add-missing-to_string-in-backtrack-messages.patch of Package elixir-hex
From 7e698c62e59f2128f1c1e03c0870d17004d28ec2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eric=20Meadows-J=C3=B6nsson?= <eric.meadows.jonsson@gmail.com> Date: Fri, 10 Jun 2016 20:58:40 +0300 Subject: [PATCH 02/13] Further add missing to_string in backtrack messages --- lib/hex/resolver/backtracks.ex | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/hex/resolver/backtracks.ex b/lib/hex/resolver/backtracks.ex index 72fac8f..696aa4f 100644 --- a/lib/hex/resolver/backtracks.ex +++ b/lib/hex/resolver/backtracks.ex @@ -235,18 +235,20 @@ defmodule Hex.Resolver.Backtracks do # to "to 0.1.0 from 0.3.0" if there are no other releases of the package # between 0.1.0 and 0.3.0. defp versions_message(package, versions) do - string_versions = Enum.map(versions, &to_string/1) case {versions, merge_versions?(package, versions)} do {[], _} -> "" {[x], _} -> - [" (version ", x, ")"] + [" (version ", to_string(x), ")"] {[x, y], _} -> - [" (versions ", x, " and ", y, ")"] + [" (versions ", to_string(x), " and ", to_string(y), ")"] {_, true} when length(versions) > 2 -> - [" (versions ", List.first(string_versions), " to ", List.last(string_versions), ")"] + first = versions |> List.first |> to_string + last = versions |> List.last |> to_string + [" (versions ", first, " to ", last, ")"] _ -> - [" (versions ", Enum.join(string_versions, ", "), ")"] + versions = Enum.map(versions, &to_string/1) + [" (versions ", Enum.join(versions, ", "), ")"] end end -- 2.1.4
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor