From 495d72397b55d152597736cf5deece23fb5f342d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tau=20G=C3=A4rtli?= Date: Mon, 8 Jul 2024 21:50:25 +0200 Subject: [PATCH] Fix build errors --- crates/egui/src/context.rs | 2 +- crates/egui/src/widgets/theme_switch/arc.rs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/egui/src/context.rs b/crates/egui/src/context.rs index 7b5b2171954..b6bb16dbf57 100644 --- a/crates/egui/src/context.rs +++ b/crates/egui/src/context.rs @@ -2862,7 +2862,7 @@ impl Context { /// the function is still called, but with no other effect. /// /// No locks are held while the given closure is called. - #[allow(clippy::unused_self)] + #[allow(clippy::unused_self, clippy::let_and_return)] #[inline] pub fn with_accessibility_parent(&self, _id: Id, f: impl FnOnce() -> T) -> T { // TODO(emilk): this isn't thread-safe - another thread can call this function between the push/pop calls diff --git a/crates/egui/src/widgets/theme_switch/arc.rs b/crates/egui/src/widgets/theme_switch/arc.rs index d1159019125..66a8a8ce454 100644 --- a/crates/egui/src/widgets/theme_switch/arc.rs +++ b/crates/egui/src/widgets/theme_switch/arc.rs @@ -52,6 +52,7 @@ fn approximate_with_bezier(center: Pos2, radius: f32, start: f32, end: f32) -> [ struct QuarterTurnsIter(Option>); const QUARTER_TURN: f32 = FRAC_PI_2; + impl Iterator for QuarterTurnsIter { type Item = RangeInclusive;