From 1a07dafb78071efe21b76428b206940e060f00e4 Mon Sep 17 00:00:00 2001 From: Mahmoud Mazouz Date: Wed, 6 Dec 2023 14:54:36 +0100 Subject: [PATCH] Use `.cloned()` instead of closure (clippy) --- src/queryable.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/queryable.rs b/src/queryable.rs index 14cb2b2e4..03b01c918 100644 --- a/src/queryable.rs +++ b/src/queryable.rs @@ -143,7 +143,7 @@ pub extern "C" fn z_query_drop(this: &mut z_owned_query_t) { #[no_mangle] pub extern "C" fn z_query_clone(query: Option<&z_query_t>) -> z_owned_query_t { match query { - Some(query) => unsafe { core::mem::transmute(query.as_ref().map(|q| q.clone())) }, + Some(query) => unsafe { core::mem::transmute(query.as_ref().cloned()) }, None => z_query_null(), } }