From 367087f84f15dce951b0899e407e157bd41e1957 Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Thu, 15 Dec 2022 15:38:31 +0100 Subject: [PATCH] Annotate at_least and at_most with #[must_use] --- crates/emath/src/lib.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/emath/src/lib.rs b/crates/emath/src/lib.rs index f5990d8f..7652252f 100644 --- a/crates/emath/src/lib.rs +++ b/crates/emath/src/lib.rs @@ -242,9 +242,11 @@ fn test_remap() { /// Extends `f32`, [`Vec2`] etc with `at_least` and `at_most` as aliases for `max` and `min`. pub trait NumExt { /// More readable version of `self.max(lower_limit)` + #[must_use] fn at_least(self, lower_limit: Self) -> Self; /// More readable version of `self.min(upper_limit)` + #[must_use] fn at_most(self, upper_limit: Self) -> Self; }