dead code x_x

This commit is contained in:
do butterflies cry? 2026-03-27 15:36:38 +10:00
parent 957910b21e
commit 841087c6c6
Signed by: cry
GPG key ID: F68745A836CA0412
2 changed files with 7 additions and 0 deletions

View file

@ -6,8 +6,10 @@ use crate::errors::new_nixide_error;
use crate::NixideResult; use crate::NixideResult;
pub trait AsCPtr<T> { pub trait AsCPtr<T> {
#[allow(unused)]
fn as_c_ptr(&self) -> NixideResult<*const T>; fn as_c_ptr(&self) -> NixideResult<*const T>;
#[allow(unused)]
fn into_c_ptr(self) -> NixideResult<*mut T>; fn into_c_ptr(self) -> NixideResult<*mut T>;
} }
@ -31,8 +33,10 @@ where
} }
pub trait CCharPtrExt { pub trait CCharPtrExt {
#[allow(unused)]
fn to_utf8_string(self) -> NixideResult<String>; fn to_utf8_string(self) -> NixideResult<String>;
#[allow(unused)]
fn to_utf8_string_n(self, n: usize) -> NixideResult<String>; fn to_utf8_string_n(self, n: usize) -> NixideResult<String>;
} }

View file

@ -6,6 +6,7 @@ pub trait AsInnerPtr<T> {
/// Although this function isn't inherently `unsafe`, it is /// Although this function isn't inherently `unsafe`, it is
/// marked as such intentionally to force calls to be wrapped /// marked as such intentionally to force calls to be wrapped
/// in `unsafe` blocks for clarity. /// in `unsafe` blocks for clarity.
#[allow(unused)]
unsafe fn as_ptr(&self) -> *mut T; unsafe fn as_ptr(&self) -> *mut T;
/// Returns a shared reference to the inner `libnix` C struct. /// Returns a shared reference to the inner `libnix` C struct.
@ -17,6 +18,7 @@ pub trait AsInnerPtr<T> {
/// Although this function isn't inherently `unsafe`, it is /// Although this function isn't inherently `unsafe`, it is
/// marked as such intentionally to force calls to be wrapped /// marked as such intentionally to force calls to be wrapped
/// in `unsafe` blocks for clarity. /// in `unsafe` blocks for clarity.
#[allow(unused)]
unsafe fn as_ref(&self) -> &T; unsafe fn as_ref(&self) -> &T;
/// Returns a unique reference to the inner `libnix` C struct. /// Returns a unique reference to the inner `libnix` C struct.
@ -28,5 +30,6 @@ pub trait AsInnerPtr<T> {
/// Although this function isn't inherently `unsafe`, it is /// Although this function isn't inherently `unsafe`, it is
/// marked as such intentionally to force calls to be wrapped /// marked as such intentionally to force calls to be wrapped
/// in `unsafe` blocks for clarity. /// in `unsafe` blocks for clarity.
#[allow(unused)]
unsafe fn as_mut(&mut self) -> &mut T; unsafe fn as_mut(&mut self) -> &mut T;
} }