From 7520dd4cc7bc0bccdeab2732e2668f3eff83e2c3 Mon Sep 17 00:00:00 2001 From: noituri Date: Fri, 10 Jan 2025 11:22:34 +0100 Subject: [PATCH] Fix clippy for rust 1.84.0 --- compositor_pipeline/src/queue/audio_queue.rs | 2 +- generate/src/bin/generate_from_types/schema_parser/utils.rs | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/compositor_pipeline/src/queue/audio_queue.rs b/compositor_pipeline/src/queue/audio_queue.rs index e3b6d2a47..957b886d5 100644 --- a/compositor_pipeline/src/queue/audio_queue.rs +++ b/compositor_pipeline/src/queue/audio_queue.rs @@ -216,7 +216,7 @@ impl AudioQueueInput { while self .queue .front() - .map_or(false, |batch| batch.end_pts < end_pts) + .is_some_and(|batch| batch.end_pts < end_pts) { self.queue.pop_front(); } diff --git a/generate/src/bin/generate_from_types/schema_parser/utils.rs b/generate/src/bin/generate_from_types/schema_parser/utils.rs index affaf614e..2749451bc 100644 --- a/generate/src/bin/generate_from_types/schema_parser/utils.rs +++ b/generate/src/bin/generate_from_types/schema_parser/utils.rs @@ -80,10 +80,7 @@ impl SchemaObjectExt for SchemaObject { // - oneOf or // - anyOf is present and has more than one non-nullable schema - let has_one_of = self - .subschemas - .as_ref() - .map_or(false, |s| s.one_of.is_some()); + let has_one_of = self.subschemas.as_ref().is_some_and(|s| s.one_of.is_some()); let non_nullabe_any_of_size = self .subschemas