Commit bd5d7c24 authored by Samuel E. Giddins's avatar Samuel E. Giddins

[Resolver] Don't call source.search twice when finding set

parent fa82a4f2
...@@ -210,9 +210,9 @@ module Pod ...@@ -210,9 +210,9 @@ module Pod
# The dependency for which the set is needed. # The dependency for which the set is needed.
# #
def find_set_from_sources(dependency) def find_set_from_sources(dependency)
source = sources.find { |s| s.search(dependency) } sources.each_with_object(nil) do |source, _|
if source set = source.search(dependency)
source.search(dependency) return set if set
end end
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment