Annotate at_least and at_most with #[must_use]
This commit is contained in:
parent
ea5c9483a2
commit
367087f84f
1 changed files with 2 additions and 0 deletions
|
@ -242,9 +242,11 @@ fn test_remap() {
|
||||||
/// Extends `f32`, [`Vec2`] etc with `at_least` and `at_most` as aliases for `max` and `min`.
|
/// Extends `f32`, [`Vec2`] etc with `at_least` and `at_most` as aliases for `max` and `min`.
|
||||||
pub trait NumExt {
|
pub trait NumExt {
|
||||||
/// More readable version of `self.max(lower_limit)`
|
/// More readable version of `self.max(lower_limit)`
|
||||||
|
#[must_use]
|
||||||
fn at_least(self, lower_limit: Self) -> Self;
|
fn at_least(self, lower_limit: Self) -> Self;
|
||||||
|
|
||||||
/// More readable version of `self.min(upper_limit)`
|
/// More readable version of `self.min(upper_limit)`
|
||||||
|
#[must_use]
|
||||||
fn at_most(self, upper_limit: Self) -> Self;
|
fn at_most(self, upper_limit: Self) -> Self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue