diff --git a/engine/src/shader.rs b/engine/src/shader.rs index 07377cff..2d000862 100644 --- a/engine/src/shader.rs +++ b/engine/src/shader.rs @@ -1,3 +1,5 @@ +#![allow(clippy::redundant_pattern_matching)] + use crate::wgpu::ShaderSource; use common::FastMap; use std::borrow::Cow; diff --git a/geom/src/skeleton.rs b/geom/src/skeleton.rs index 228883b6..36824d05 100644 --- a/geom/src/skeleton.rs +++ b/geom/src/skeleton.rs @@ -124,7 +124,7 @@ impl Eq for Event {} impl PartialOrd for Event { fn partial_cmp(&self, other: &Self) -> Option { - self.distance().partial_cmp(&other.distance()) + Some(self.cmp(other)) } } diff --git a/native_app/src/rendering/orbit_camera.rs b/native_app/src/rendering/orbit_camera.rs index 2be47fa7..05af0efe 100644 --- a/native_app/src/rendering/orbit_camera.rs +++ b/native_app/src/rendering/orbit_camera.rs @@ -1,3 +1,4 @@ +#![allow(clippy::redundant_closure_call)] use crate::gui::windows::settings::Settings; use crate::inputmap::{InputAction, InputMap}; use common::saveload::Encoder; diff --git a/simulation/src/map/objects/turn.rs b/simulation/src/map/objects/turn.rs index 8580fe78..843e1c3f 100644 --- a/simulation/src/map/objects/turn.rs +++ b/simulation/src/map/objects/turn.rs @@ -54,7 +54,7 @@ impl Borrow for Turn { impl PartialOrd for Turn { fn partial_cmp(&self, other: &Self) -> Option { - self.id.partial_cmp(&other.id) + Some(self.cmp(other)) } } diff --git a/simulation/src/map/turn_policy.rs b/simulation/src/map/turn_policy.rs index ae5b83ec..51aadbd7 100644 --- a/simulation/src/map/turn_policy.rs +++ b/simulation/src/map/turn_policy.rs @@ -22,6 +22,7 @@ pub struct TurnPolicy { pub left_turns: bool, pub crosswalks: bool, #[inspect(proxy_type = "OptionDefault")] + #[serde(default, skip_serializing_if = "Option::is_none")] pub roundabout: Option, }