Fix Performance/MapCompact cop (#24797)

Co-authored-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
Matt Jankowski
2023-05-23 04:49:12 -04:00
committed by GitHub
parent 0664704cd9
commit 9f5deb310b
16 changed files with 25 additions and 44 deletions

View File

@ -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