Skip to content

Commit

Permalink
Fix clippy::correctness
Browse files Browse the repository at this point in the history
  • Loading branch information
Noratrieb committed Dec 30, 2023
1 parent 7b7c103 commit 39de58d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/symbolize/gimli/stash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ impl Stash {

/// Allocates a buffer of the specified size and returns a mutable reference
/// to it.
#[allow(clippy::mut_from_ref)] // This is an arena allocator.
pub fn allocate(&self, size: usize) -> &mut [u8] {
// SAFETY: this is the only function that ever constructs a mutable
// reference to `self.buffers`.
Expand Down
1 change: 1 addition & 0 deletions src/symbolize/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ use rustc_demangle::{try_demangle, Demangle};
/// }
/// ```
#[cfg(feature = "std")]
#[allow(clippy::not_unsafe_ptr_arg_deref)] // The unsafe does not come from ptr deref
pub fn resolve<F: FnMut(&Symbol)>(addr: *mut c_void, cb: F) {
let _guard = crate::lock::lock();
unsafe { resolve_unsynchronized(addr, cb) }
Expand Down

0 comments on commit 39de58d

Please sign in to comment.