Skip to content

Commit

Permalink
Merge pull request #212 from waywardmonkeys/clippy-unnecessary-cast
Browse files Browse the repository at this point in the history
clippy: Remove unneccessary casts.
  • Loading branch information
fitzgen authored Aug 21, 2023
2 parents 2c3ded0 + 4d4cb90 commit 9be533b
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 9be533b

Please sign in to comment.