diff options
author | Peter Leitzen <pleitzen@gitlab.com> | 2019-07-26 10:44:13 +0000 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2019-07-26 10:44:13 +0000 |
commit | 8136fac26c8f470720ff90d152b93abf50f5084d (patch) | |
tree | 3f50aab69d5c5841d9b5aa1c9a64804eea29d877 /lib/gitlab/background_migration/backfill_project_repositories.rb | |
parent | 0d2b5bff8c524376f42316f1a4cc8cfbeabc2d8d (diff) | |
download | gitlab-ce-8136fac26c8f470720ff90d152b93abf50f5084d.tar.gz |
Prefer `flat_map` over `map` + `flatten`
Convert several occurrences of `map` + `flatten` to
`flat_map` where applicable.
Diffstat (limited to 'lib/gitlab/background_migration/backfill_project_repositories.rb')
-rw-r--r-- | lib/gitlab/background_migration/backfill_project_repositories.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/background_migration/backfill_project_repositories.rb b/lib/gitlab/background_migration/backfill_project_repositories.rb index c8d83cc1803..1d9aa050041 100644 --- a/lib/gitlab/background_migration/backfill_project_repositories.rb +++ b/lib/gitlab/background_migration/backfill_project_repositories.rb @@ -40,7 +40,7 @@ module Gitlab end def reload! - @shards = Hash[*Shard.all.map { |shard| [shard.name, shard.id] }.flatten] + @shards = Hash[*Shard.all.flat_map { |shard| [shard.name, shard.id] }] end end |