Skip to content

Commit

Permalink
Prefer Tuple over Array to format a message to reduce GC
Browse files Browse the repository at this point in the history
  • Loading branch information
veelenga committed May 13, 2018
1 parent fafe264 commit 7a4fcec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ameba/rule/unused_argument.cr
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ module Ameba::Rule
next if argument.ignored? || scope.references?(argument.variable)

name_suggestion = scope.node.is_a?(Crystal::Block) ? '_' : "_#{argument.name}"
source.error self, argument.location, MSG % [argument.name, name_suggestion]
source.error self, argument.location, MSG % {argument.name, name_suggestion}
end
end
end
Expand Down

0 comments on commit 7a4fcec

Please sign in to comment.