Fix Performance/MapCompact cop (#24797)
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
@ -20,7 +20,7 @@ class AccountSuggestions::Source
|
||||
|
||||
map = scope.index_by { |account| to_ordered_list_key(account) }
|
||||
|
||||
ordered_list.map { |ordered_list_key| map[ordered_list_key] }.compact.map do |account|
|
||||
ordered_list.filter_map { |ordered_list_key| map[ordered_list_key] }.map do |account|
|
||||
AccountSuggestions::Suggestion.new(
|
||||
account: account,
|
||||
source: key
|
||||
|
Reference in New Issue
Block a user