summaryrefslogtreecommitdiffstats
path: root/openpgp-ffi
diff options
context:
space:
mode:
authorNora Widdecke <nora@sequoia-pgp.org>2021-04-06 21:24:59 +0200
committerNora Widdecke <nora@sequoia-pgp.org>2021-04-09 13:13:58 +0200
commit5d029cbf42621452666bd084f7beecb7d3d885a4 (patch)
tree21219c5864beac97ff5c55c78b436918034adcd6 /openpgp-ffi
parent9424cd350f32a97479a74d919c646f9e26c2ebce (diff)
Lint: Remove unnecessary conversions.
- https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
Diffstat (limited to 'openpgp-ffi')
-rw-r--r--openpgp-ffi/src/packet/literal.rs2
-rw-r--r--openpgp-ffi/src/parse/stream.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/openpgp-ffi/src/packet/literal.rs b/openpgp-ffi/src/packet/literal.rs
index 2efea3c6..7bb25844 100644
--- a/openpgp-ffi/src/packet/literal.rs
+++ b/openpgp-ffi/src/packet/literal.rs
@@ -51,7 +51,7 @@ fn pgp_literal_into_packet(l: *mut Literal) -> *mut Packet {
/// returns NULL in such cases.
#[::sequoia_ffi_macros::extern_fn] #[no_mangle] pub extern "C"
fn pgp_literal_filename(l: *const Literal) -> *mut c_char {
- let l : &openpgp::packet::Literal = l.ref_raw().into();
+ let l : &openpgp::packet::Literal = l.ref_raw();
if let Some(filename) = l.filename() {
ffi_return_maybe_string!(filename)
} else {
diff --git a/openpgp-ffi/src/parse/stream.rs b/openpgp-ffi/src/parse/stream.rs
index 16fb1829..f5f6a206 100644
--- a/openpgp-ffi/src/parse/stream.rs
+++ b/openpgp-ffi/src/parse/stream.rs
@@ -465,7 +465,7 @@ impl VerificationHelper for VHelper {
Status::Success => Ok(()),
// XXX: Convert the status to an error better.
status => Err(anyhow::anyhow!(
- "Inspect Callback returned an error: {:?}", status).into()),
+ "Inspect Callback returned an error: {:?}", status)),
}
} else {
Ok(())