From fc14c38883dd71c6375ba040edc8654958f4d7ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabio=20William=20Concei=C3=A7=C3=A3o?= Date: Thu, 15 Oct 2026 12:42:07 +0100 Subject: [PATCH] fix(pdf): collapse Shading match for clippy 1.95 (#2131) Rust 1.95 clippy -D warnings rejects the nested if under TypedInstruction::Shading (collapsible_match). Fold the shading lookup into the match arm guard so the Ubuntu xtask ci gate can pass on the same toolchain Actions pins. Co-authored-by: Cursor --- crates/pdf/src/import_scan.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/crates/pdf/src/import_scan.rs b/crates/pdf/src/import_scan.rs index 00f86e1a3..65124d8e0 100644 --- a/crates/pdf/src/import_scan.rs +++ b/crates/pdf/src/import_scan.rs @@ -545,10 +545,8 @@ impl Walker<'_, '_> { self.painted(true); } // Drawn when the interpreter can read the shading: the page's count tells. - TypedInstruction::Shading(s) => { - if res.get_shading(s.0).is_some() { - self.painted(false); - } + TypedInstruction::Shading(s) if res.get_shading(s.0).is_some() => { + self.painted(false); } TypedInstruction::ShowText(_) | TypedInstruction::ShowTexts(_)