Skip to content

Commit

Permalink
clippy: Remove unneccessary casts.
Browse files Browse the repository at this point in the history
  • Loading branch information
waywardmonkeys committed Aug 16, 2023
1 parent 2c3ded0 commit 4d4cb90
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1430,7 +1430,7 @@ impl Bump {
let aligned_ptr = ptr.wrapping_sub(rem);

if aligned_ptr >= start {
let aligned_ptr = NonNull::new_unchecked(aligned_ptr as *mut u8);
let aligned_ptr = NonNull::new_unchecked(aligned_ptr);
footer.ptr.set(aligned_ptr);
Some(aligned_ptr)
} else {
Expand Down Expand Up @@ -1529,7 +1529,7 @@ impl Bump {
ptr,
new_footer
);
let ptr = NonNull::new_unchecked(ptr as *mut u8);
let ptr = NonNull::new_unchecked(ptr);
new_footer.ptr.set(ptr);

// Return a pointer to the freshly allocated region in this chunk.
Expand Down

0 comments on commit 4d4cb90

Please sign in to comment.