From 91e60e210a1b62b96fa4149ff34fcbbfecec9470 Mon Sep 17 00:00:00 2001 From: Eric Engestrom Date: Mon, 6 Oct 2025 15:53:47 +0200 Subject: [PATCH] compiler/rust: allow CFG & BitSetStreamTrait to have a `len()` without also having an `is_empty()` Part-of: --- src/compiler/rust/bitset.rs | 1 + src/compiler/rust/cfg.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/src/compiler/rust/bitset.rs b/src/compiler/rust/bitset.rs index c57811f7e7e..e868ac3044a 100644 --- a/src/compiler/rust/bitset.rs +++ b/src/compiler/rust/bitset.rs @@ -292,6 +292,7 @@ impl FromIterator for BitSet { } } +#[expect(clippy::len_without_is_empty)] pub trait BitSetStreamTrait { /// Get the next word /// diff --git a/src/compiler/rust/cfg.rs b/src/compiler/rust/cfg.rs index abdd596c860..ffa654d3566 100644 --- a/src/compiler/rust/cfg.rs +++ b/src/compiler/rust/cfg.rs @@ -330,6 +330,7 @@ pub struct CFG { nodes: Vec>, } +#[expect(clippy::len_without_is_empty)] impl CFG { /// Creates a new CFG from nodes and edges. pub fn from_blocks_edges(