diff options
author | Andrew Newdigate <andrew@gitlab.com> | 2019-02-08 14:19:53 +0200 |
---|---|---|
committer | Andrew Newdigate <andrew@gitlab.com> | 2019-03-06 17:51:56 +0200 |
commit | 3288e1a874ec0184f9f27f932748e51c57babf17 (patch) | |
tree | 9f8667f5349ecfc59f3c8a6e9641cb1e32fa3d5b /lib/gitlab/database | |
parent | 7bbdb2a29fbc7b8c9f879c42de7063adaa8313c7 (diff) | |
download | gitlab-ce-3288e1a874ec0184f9f27f932748e51c57babf17.tar.gz |
Adds the Rubocop ReturnNil cop
This style change enforces `return if ...` instead of
`return nil if ...` to save maintainers a few minor review points
Diffstat (limited to 'lib/gitlab/database')
-rw-r--r-- | lib/gitlab/database/count/tablesample_count_strategy.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/database/count/tablesample_count_strategy.rb b/lib/gitlab/database/count/tablesample_count_strategy.rb index cf1cf054dbf..fedf6ca4fe1 100644 --- a/lib/gitlab/database/count/tablesample_count_strategy.rb +++ b/lib/gitlab/database/count/tablesample_count_strategy.rb @@ -36,7 +36,7 @@ module Gitlab def perform_count(model, estimate) # If we estimate 0, we may not have statistics at all. Don't use them. - return nil unless estimate && estimate > 0 + return unless estimate && estimate > 0 if estimate < EXACT_COUNT_THRESHOLD # The table is considered small, the assumption here is that |