Skip to content

Commit

Permalink
Use .cloned() instead of closure (clippy)
Browse files Browse the repository at this point in the history
  • Loading branch information
fuzzypixelz committed Dec 6, 2023
1 parent 464735e commit 1a07daf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/queryable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
}
}
Expand Down

0 comments on commit 1a07daf

Please sign in to comment.