Skip to content

Commit

Permalink
fix: Fix dead code warning on Unix platforms (#403)
Browse files Browse the repository at this point in the history
  • Loading branch information
mwcampbell committed May 4, 2024
1 parent e771ca3 commit 09d9157
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bindings/c/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ pub(crate) trait BoxCastPtr: CastPtr + Sized {
Box::into_raw(Box::new(src)) as *mut _
}

// The following exception is needed because this function is only
// used in the bindings for some platform adapters.
#[allow(dead_code)]
fn to_nullable_mut_ptr(src: Option<Self::RustType>) -> *mut Self {
src.map_or_else(std::ptr::null_mut, Self::to_mut_ptr)
}
Expand Down
3 changes: 3 additions & 0 deletions bindings/python/src/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -715,6 +715,9 @@ impl From<accesskit::ActionRequest> for ActionRequest {
}
}

// The following exception is needed because this struct is only used
// in the bindings for some platform adapters.
#[allow(dead_code)]
pub(crate) struct LocalPythonActivationHandler<'a> {
pub(crate) py: Python<'a>,
pub(crate) handler: Py<PyAny>,
Expand Down

0 comments on commit 09d9157

Please sign in to comment.