diff --git a/nixide/src/stdext/cchar_ptr_ext.rs b/nixide/src/stdext/cchar_ptr_ext.rs index 733ed98..0a91b86 100644 --- a/nixide/src/stdext/cchar_ptr_ext.rs +++ b/nixide/src/stdext/cchar_ptr_ext.rs @@ -6,8 +6,10 @@ use crate::errors::new_nixide_error; use crate::NixideResult; pub trait AsCPtr { + #[allow(unused)] fn as_c_ptr(&self) -> NixideResult<*const T>; + #[allow(unused)] fn into_c_ptr(self) -> NixideResult<*mut T>; } @@ -31,8 +33,10 @@ where } pub trait CCharPtrExt { + #[allow(unused)] fn to_utf8_string(self) -> NixideResult; + #[allow(unused)] fn to_utf8_string_n(self, n: usize) -> NixideResult; } diff --git a/nixide/src/util/wrappers.rs b/nixide/src/util/wrappers.rs index c3e4b07..938187c 100644 --- a/nixide/src/util/wrappers.rs +++ b/nixide/src/util/wrappers.rs @@ -6,6 +6,7 @@ pub trait AsInnerPtr { /// Although this function isn't inherently `unsafe`, it is /// marked as such intentionally to force calls to be wrapped /// in `unsafe` blocks for clarity. + #[allow(unused)] unsafe fn as_ptr(&self) -> *mut T; /// Returns a shared reference to the inner `libnix` C struct. @@ -17,6 +18,7 @@ pub trait AsInnerPtr { /// Although this function isn't inherently `unsafe`, it is /// marked as such intentionally to force calls to be wrapped /// in `unsafe` blocks for clarity. + #[allow(unused)] unsafe fn as_ref(&self) -> &T; /// Returns a unique reference to the inner `libnix` C struct. @@ -28,5 +30,6 @@ pub trait AsInnerPtr { /// Although this function isn't inherently `unsafe`, it is /// marked as such intentionally to force calls to be wrapped /// in `unsafe` blocks for clarity. + #[allow(unused)] unsafe fn as_mut(&mut self) -> &mut T; }