Skip to content

Commit

Permalink
Add some must-use annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
bkirwi committed Feb 23, 2024
1 parent 7461707 commit 9d6b4ed
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions timely/src/order.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,13 @@
/// `a.less_equal(b)` and `b.less_equal(a)`.
pub trait PartialOrder : Eq {
/// Returns true iff one element is strictly less than the other.
#[must_use]
fn less_than(&self, other: &Self) -> bool {
self.less_equal(other) && self != other
}

/// Returns true iff one element is less than or equal to the other.
#[must_use]
fn less_equal(&self, other: &Self) -> bool;
}

Expand Down

0 comments on commit 9d6b4ed

Please sign in to comment.