Skip to content

Commit 1d2b0db

Browse files
Copilotyouknowone
andcommitted
chore: satisfy clippy for union dedup
Co-authored-by: youknowone <69878+youknowone@users.noreply.github.com>
1 parent 3b4e565 commit 1d2b0db

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

‎crates/vm/src/builtins/union.rs‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -194,10 +194,9 @@ fn dedup_and_flatten_args(args: &Py<PyTuple>, vm: &VirtualMachine) -> PyTupleRef
194194
let mut new_args: Vec<PyObjectRef> = Vec::with_capacity(args.len());
195195
for arg in &*args {
196196
if !new_args.iter().any(|param| {
197-
match param.rich_compare_bool(arg, PyComparisonOp::Eq, vm) {
198-
Ok(val) => val,
199-
Err(_) => false,
200-
}
197+
param
198+
.rich_compare_bool(arg, PyComparisonOp::Eq, vm)
199+
.unwrap_or_default()
201200
}) {
202201
new_args.push(arg.clone());
203202
}

0 commit comments

Comments
 (0)