Skip to content

Commit f0aab63

Browse files
authored
Lint: use filter_map (#1637)
1 parent d099faf commit f0aab63

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/faraday/encoders/flat_params_encoder.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ def self.decode(query)
7676

7777
empty_accumulator = {}
7878

79-
split_query = (query.split('&').map do |pair|
79+
split_query = query.split('&').filter_map do |pair|
8080
pair.split('=', 2) if pair && !pair.empty?
81-
end).compact
81+
end
8282
split_query.each_with_object(empty_accumulator.dup) do |pair, accu|
8383
pair[0] = unescape(pair[0])
8484
pair[1] = true if pair[1].nil?

0 commit comments

Comments
 (0)