From d998701d8a380e98cd11301759f3ae3060ebba68 Mon Sep 17 00:00:00 2001 From: pasta Date: Mon, 18 Mar 2024 13:17:28 -0500 Subject: [PATCH] chore: use filter --- grovedb/src/batch/mod.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/grovedb/src/batch/mod.rs b/grovedb/src/batch/mod.rs index ba58f674..b6e33e3d 100644 --- a/grovedb/src/batch/mod.rs +++ b/grovedb/src/batch/mod.rs @@ -589,19 +589,19 @@ impl GroveDbOp { let inserts = ops .iter() - .filter_map(|current_op| match current_op.op { - Op::Insert { .. } | Op::Replace { .. } => Some(current_op), - _ => None, + .filter(|current_op| match current_op.op { + Op::Insert { .. } | Op::Replace { .. } => true, + _ => false, }) .collect::>(); let deletes = ops .iter() - .filter_map(|current_op| { + .filter(|current_op| { if let Op::Delete = current_op.op { - Some(current_op) + true } else { - None + false } }) .collect::>();