From 748e741f740ac46ec40e42679aba3b07927709c0 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 17 May 2026 15:08:03 +0900 Subject: chore: cargo clippy --fix --- crates/shirabe-semver/src/intervals.rs | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) (limited to 'crates/shirabe-semver/src/intervals.rs') diff --git a/crates/shirabe-semver/src/intervals.rs b/crates/shirabe-semver/src/intervals.rs index be7466e..898cab3 100644 --- a/crates/shirabe-semver/src/intervals.rs +++ b/crates/shirabe-semver/src/intervals.rs @@ -393,11 +393,7 @@ impl Intervals { if branches.exclude { // disjunctive constraint, so only exclude what's excluded in all constraints // !=a,!=b || !=b,!=c => !=b - branches.names = branches - .names - .into_iter() - .filter(|n| b.names.contains(n)) - .collect(); + branches.names.retain(|n| b.names.contains(n)); } else { // disjunctive constraint so exclude all names which are not explicitly // included in the alternative @@ -414,11 +410,7 @@ impl Intervals { // disjunctive constraint so exclude all names which are not explicitly // included in the alternative // !=a,!=b || (==b || ==c) => !=a - branches.names = branches - .names - .into_iter() - .filter(|n| !b.names.contains(n)) - .collect(); + branches.names.retain(|n| !b.names.contains(n)); } else { // disjunctive constraint, so just add all the other branches // (==a || ==b) || ==c => ==a || ==b || ==c @@ -438,11 +430,7 @@ impl Intervals { } else { // conjunctive, so only keep included names which are not excluded // (==a||==c) && !=a,!=b => ==c - branches.names = branches - .names - .into_iter() - .filter(|n| !b.names.contains(n)) - .collect(); + branches.names.retain(|n| !b.names.contains(n)); } } else { if branches.exclude { @@ -457,11 +445,7 @@ impl Intervals { } else { // conjunctive, so only keep names that are included in both // (==a||==b) && (==a||==c) => ==a - branches.names = branches - .names - .into_iter() - .filter(|n| b.names.contains(n)) - .collect(); + branches.names.retain(|n| b.names.contains(n)); } } } -- cgit v1.3.1