Skip to content

Commit

Permalink
Update src/ameba/rule/lint/unused_generic_or_union.cr
Browse files Browse the repository at this point in the history
Co-authored-by: Sijawusz Pur Rahnama <[email protected]>
  • Loading branch information
nobodywasishere and Sija authored Jan 27, 2025
1 parent 29bbdeb commit 2e7b83f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ameba/rule/lint/unused_generic_or_union.cr
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ module Ameba::Rule::Lint
issue_for node, GENERIC_MSG unless node_is_used
end

private def path_or_generic_union?(node : Crystal::Call) : Bool
private def path_or_generic_union?(node : Crystal::Call)
node.name == "|" && node.args.size == 1 && (obj = node.obj) &&
valid_type_node?(obj) && valid_type_node?(node.args.first)
end
Expand Down

0 comments on commit 2e7b83f

Please sign in to comment.