Skip to content

Commit

Permalink
fix: use total_cmp where possible
Browse files Browse the repository at this point in the history
  • Loading branch information
wash2 authored and ryanabx committed Dec 23, 2024
1 parent f744a4b commit bd0d9be
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/src/gradient.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ impl Linear {
let (Ok(index) | Err(index)) =
self.stops.binary_search_by(|stop| match stop {
None => Ordering::Greater,
Some(stop) => stop.offset.partial_cmp(&offset).unwrap(),
Some(stop) => stop.offset.total_cmp(&offset),
});

if index < 8 {
Expand Down
2 changes: 1 addition & 1 deletion graphics/src/gradient.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ impl Linear {
let (Ok(index) | Err(index)) =
self.stops.binary_search_by(|stop| match stop {
None => Ordering::Greater,
Some(stop) => stop.offset.partial_cmp(&offset).unwrap(),
Some(stop) => stop.offset.total_cmp(&offset),
});

if index < 8 {
Expand Down

0 comments on commit bd0d9be

Please sign in to comment.