mirror of
https://github.com/mastodon/mastodon.git
synced 2024-08-20 21:08:15 -07:00
Fix Performance/RedundantEqualityComparisonBlock cop (#24799)
This commit is contained in:
parent
9c1929efad
commit
97385f27bd
2 changed files with 1 additions and 7 deletions
|
@ -327,12 +327,6 @@ Performance/MethodObjectAsBlock:
|
|||
- 'app/models/account_suggestions/source.rb'
|
||||
- 'spec/models/export_spec.rb'
|
||||
|
||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
||||
# Configuration parameters: AllowRegexpMatch.
|
||||
Performance/RedundantEqualityComparisonBlock:
|
||||
Exclude:
|
||||
- 'spec/requests/link_headers_spec.rb'
|
||||
|
||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
||||
# Configuration parameters: MaxKeyValuePairs.
|
||||
Performance/RedundantMerge:
|
||||
|
|
|
@ -26,7 +26,7 @@ describe 'Link headers' do
|
|||
|
||||
def link_header_with_type(type)
|
||||
LinkHeader.parse(response.headers['Link'].to_s).links.find do |link|
|
||||
link.attr_pairs.any? { |pair| pair == ['type', type] }
|
||||
link.attr_pairs.any?(['type', type])
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue