Skip to content

Commit

Permalink
fix: explicitly compare the spans instead of relying on the Ord imple…
Browse files Browse the repository at this point in the history
…mentation
  • Loading branch information
granddaifuku authored and drahnr committed Jul 18, 2023
1 parent 91e0809 commit da9c125
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/suggestion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,10 @@ impl<'s> Suggestion<'s> {
return false;
}

if self < other {
if self.span.start.line < other.span.start.line
|| (self.span.start.line == other.span.start.line
&& self.span.start.column < other.span.start.column)
{
self.span.end.column > other.span.start.column
} else {
self.span.start.column < other.span.end.column
Expand Down

0 comments on commit da9c125

Please sign in to comment.