Skip to content

Commit

Permalink
just use map and avoid a flatten copy
Browse files Browse the repository at this point in the history
  • Loading branch information
reidnimz committed Nov 21, 2023
1 parent d50c6e0 commit 60b863b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/ruby_snowflake/result.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ def []=(index, value)
end

def get_all_rows
# TODO use map to skip a flatten
data.map { |part| part.map { |r| wrap_row(r).to_h } }.flatten
map(&:to_h)
end

def each
Expand Down

0 comments on commit 60b863b

Please sign in to comment.