summaryrefslogtreecommitdiffstats
path: root/ffi/src/core.rs
diff options
context:
space:
mode:
authorNora Widdecke <nora@sequoia-pgp.org>2021-04-07 16:12:06 +0200
committerNora Widdecke <nora@sequoia-pgp.org>2021-04-09 13:13:58 +0200
commita23a14d0471512d360364b69df51161e84c9e0d0 (patch)
tree96f9c3d1ba810656bc72788bb354d727772b4fb9 /ffi/src/core.rs
parent0c538f122d7a498a58f9b380b6be03a40f827c3e (diff)
Lint: Remove redundant closures.
- https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
Diffstat (limited to 'ffi/src/core.rs')
-rw-r--r--ffi/src/core.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/ffi/src/core.rs b/ffi/src/core.rs
index 59f465b7..2879006b 100644
--- a/ffi/src/core.rs
+++ b/ffi/src/core.rs
@@ -88,7 +88,7 @@ fn sq_context_last_error(ctx: *mut Context) -> *mut crate::error::Error {
fn sq_context_new(errp: Option<&mut *mut crate::error::Error>)
-> *mut Context {
ffi_make_fry_from_errp!(errp);
- ffi_try_box!(core::Context::new().map(|ctx| Context::new(ctx)))
+ ffi_try_box!(core::Context::new().map(Context::new))
}
/// Frees a context.
@@ -148,7 +148,7 @@ fn sq_config_build(cfg: *mut Config, errp: Option<&mut *mut crate::error::Error>
ffi_make_fry_from_errp!(errp);
let cfg = ffi_param_move!(cfg);
- ffi_try_box!(cfg.build().map(|ctx| Context::new(ctx)))
+ ffi_try_box!(cfg.build().map(Context::new))
}
/// Sets the directory containing shared state.