From 730ac1e5cba491456c899d07e3813aedb61cc2b5 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Wed, 29 Sep 2021 10:29:29 +0300 Subject: Allow a pointer-to-pointer transmutation We should arguably use a different approach, but I don't understand the code enough to suggest how. Found by clippy lint transmute_ptr_to_ptr: https://rust-lang.github.io/rust-clippy/master/index.html#transmute_ptr_to_ptr --- openpgp/src/packet/key/conversions.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'openpgp') diff --git a/openpgp/src/packet/key/conversions.rs b/openpgp/src/packet/key/conversions.rs index 1665e7c5..150e1e9a 100644 --- a/openpgp/src/packet/key/conversions.rs +++ b/openpgp/src/packet/key/conversions.rs @@ -27,6 +27,7 @@ macro_rules! convert { macro_rules! convert_ref { ( $x:ident ) => { // XXX: This is ugly, but how can we do better? + #[allow(clippy::transmute_ptr_to_ptr)] unsafe { std::mem::transmute($x) } } } -- cgit v1.2.3