Fix Performance/MapCompact cop (#24797)
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
parent
0664704cd9
commit
9f5deb310b
16 changed files with 25 additions and 44 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue