Skip to content

Commit

Permalink
Drop generic parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
spuun committed Nov 13, 2024
1 parent 7db0b67 commit 5e7e509
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lavinmq/metadata.cr
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ module LavinMQ
@value
end

def <=>(other : Value(U)) forall U
def <=>(other : Value)
return 0 if @value.nil? && other.@value.nil?
return -1 if @value.nil?
return 1 if other.@value.nil?

{% if T <= Number && U <= Number %}
if other_value = other.@value
{% if T <= Number %}
if other_value = other.@value.as?(Number)
return @value <=> other_value
end
{% end %}
Expand Down

0 comments on commit 5e7e509

Please sign in to comment.