Refine #[must_use]

This commit is contained in:
Stephen Chung
2022-11-28 16:36:40 +08:00
parent f458f18ffa
commit 29a397b216
11 changed files with 49 additions and 50 deletions

View File

@@ -15,6 +15,7 @@ use num_traits::float::FloatCore as Float;
///
/// Not available under `no_float`.
#[derive(Clone, Copy, Eq, PartialEq, PartialOrd)]
#[must_use]
pub struct FloatWrapper<F>(F);
impl Hash for FloatWrapper<crate::FLOAT> {
@@ -108,7 +109,6 @@ impl<F: Float> FloatWrapper<F> {
/// Create a new [`FloatWrapper`].
#[inline(always)]
#[must_use]
pub const fn new(value: F) -> Self {
Self(value)
}