summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ffi-macros/src/lib.rs2
-rw-r--r--openpgp-ffi/src/common.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/ffi-macros/src/lib.rs b/ffi-macros/src/lib.rs
index 112577c6..a3ddcce3 100644
--- a/ffi-macros/src/lib.rs
+++ b/ffi-macros/src/lib.rs
@@ -413,7 +413,7 @@ fn derive_conversion_functions(mut st: syn::ItemStruct,
}
}
- impl ::RefRaw<#wrapped> for *const #wrapper {
+ impl ::RefRaw<&'static #wrapped> for *const #wrapper {
fn ref_raw(self) -> &'static #wrapped {
if self.is_null() {
panic!("FFI contract violation: Parameter is NULL");
diff --git a/openpgp-ffi/src/common.rs b/openpgp-ffi/src/common.rs
index 8c1dd2ad..6efa9ec4 100644
--- a/openpgp-ffi/src/common.rs
+++ b/openpgp-ffi/src/common.rs
@@ -238,7 +238,7 @@ pub(crate) trait MoveFromRaw<T> {
/// Moves a reference to an object from C to Rust.
pub(crate) trait RefRaw<T> {
/// Moves this reference to an object from C to Rust.
- fn ref_raw(self) -> &'static T;
+ fn ref_raw(self) -> T;
}
/// Moves a mutable reference to an object from C to Rust.