diff --git a/crates/fj-core/src/algorithms/transform/mod.rs b/crates/fj-core/src/algorithms/transform/mod.rs index b13bc49d8..f9230d669 100644 --- a/crates/fj-core/src/algorithms/transform/mod.rs +++ b/crates/fj-core/src/algorithms/transform/mod.rs @@ -100,6 +100,9 @@ pub struct TransformCache(TypeMap); impl TransformCache { fn get(&mut self, key: &Handle) -> Option<&Handle> { + // Silencing Clippy warning due to false positive in Rust 1.73.0. See: + // https://github.com/rust-lang/rust-clippy/issues/11390#issuecomment-1750951533 + #[allow(clippy::unwrap_or_default)] let map = self .0 .entry::>>() @@ -109,6 +112,9 @@ impl TransformCache { } fn insert(&mut self, key: Handle, value: Handle) { + // Silencing Clippy warning due to false positive in Rust 1.73.0. See: + // https://github.com/rust-lang/rust-clippy/issues/11390#issuecomment-1750951533 + #[allow(clippy::unwrap_or_default)] let map = self .0 .entry::>>() diff --git a/crates/fj-core/src/geometry/boundary/single.rs b/crates/fj-core/src/geometry/boundary/single.rs index bd11aa384..bb87b509e 100644 --- a/crates/fj-core/src/geometry/boundary/single.rs +++ b/crates/fj-core/src/geometry/boundary/single.rs @@ -158,7 +158,7 @@ impl Ord for CurveBoundary { impl PartialOrd for CurveBoundary { fn partial_cmp(&self, other: &Self) -> Option { - self.inner.partial_cmp(&other.inner) + Some(self.cmp(other)) } } diff --git a/crates/fj-core/src/storage/handle.rs b/crates/fj-core/src/storage/handle.rs index 63eea2908..cbcc85aab 100644 --- a/crates/fj-core/src/storage/handle.rs +++ b/crates/fj-core/src/storage/handle.rs @@ -245,7 +245,7 @@ impl Ord for HandleWrapper { impl PartialOrd for HandleWrapper { fn partial_cmp(&self, other: &Self) -> Option { - self.0.id().partial_cmp(&other.0.id()) + Some(self.cmp(other)) } } diff --git a/crates/fj-math/src/scalar.rs b/crates/fj-math/src/scalar.rs index 88fc2ba99..90d7a1a9d 100644 --- a/crates/fj-math/src/scalar.rs +++ b/crates/fj-math/src/scalar.rs @@ -160,7 +160,7 @@ impl Eq for Scalar {} impl PartialOrd for Scalar { fn partial_cmp(&self, other: &Self) -> Option { - self.0.partial_cmp(&other.0) + Some(self.cmp(other)) } } @@ -168,7 +168,7 @@ impl Ord for Scalar { fn cmp(&self, other: &Self) -> cmp::Ordering { // Should never panic, as `from_f64` checks that the wrapped value is // finite. - self.partial_cmp(other).expect("Invalid `Scalar`") + self.0.partial_cmp(&other.0).expect("Invalid `Scalar`") } } diff --git a/crates/fj-viewer/src/viewer.rs b/crates/fj-viewer/src/viewer.rs index 06a367592..ac330ee78 100644 --- a/crates/fj-viewer/src/viewer.rs +++ b/crates/fj-viewer/src/viewer.rs @@ -1,5 +1,4 @@ use fj_interop::model::Model; -use fj_math::Aabb; use tracing::warn; use crate::{ @@ -93,7 +92,7 @@ impl Viewer { .model .as_ref() .map(|shape| shape.aabb) - .unwrap_or_else(Aabb::default); + .unwrap_or_default(); self.camera.update_planes(&aabb); diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 4a410ecac..edf53789e 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,5 +1,5 @@ [toolchain] -channel = "1.72.1" +channel = "1.73.0" components = ["rustfmt", "clippy"] targets = [ "aarch64-apple-ios",