Skip to content

Commit

Permalink
Fixup clippy lint violations
Browse files Browse the repository at this point in the history
  • Loading branch information
lopopolo committed Dec 24, 2023
1 parent 5be5e29 commit 1cbdaa9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/rc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1006,7 +1006,7 @@ impl<T> Rc<T> {

// Copy value as bytes
ptr::copy_nonoverlapping(
(box_ptr as *const T).cast::<u8>(),
box_ptr.cast_const().cast::<u8>(),
ptr::addr_of_mut!((*ptr).value).cast::<u8>(),
value_size,
);
Expand Down Expand Up @@ -1508,7 +1508,7 @@ impl<T> Weak<T> {
pub unsafe fn from_raw(ptr: *const T) -> Self {
// See Weak::as_ptr for context on how the input pointer is derived.

let ptr = if is_dangling(ptr as *mut T) {
let ptr = if is_dangling(ptr.cast_mut()) {
// This is a dangling Weak.
ptr as *mut RcBox<T>
} else {
Expand Down

0 comments on commit 1cbdaa9

Please sign in to comment.