Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Leitzen <pleitzen@gitlab.com>2019-07-26 13:44:13 +0300
committerLin Jen-Shin <godfat@godfat.org>2019-07-26 13:44:13 +0300
commit8136fac26c8f470720ff90d152b93abf50f5084d (patch)
tree3f50aab69d5c5841d9b5aa1c9a64804eea29d877 /lib/gitlab/background_migration
parent0d2b5bff8c524376f42316f1a4cc8cfbeabc2d8d (diff)
Prefer `flat_map` over `map` + `flatten`
Convert several occurrences of `map` + `flatten` to `flat_map` where applicable.
Diffstat (limited to 'lib/gitlab/background_migration')
-rw-r--r--lib/gitlab/background_migration/backfill_project_repositories.rb2
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