Skip to content

Commit

Permalink
Fix clippy warning about unnecessary cast
Browse files Browse the repository at this point in the history
  • Loading branch information
1c3t3a committed Jul 31, 2024
1 parent 4bd8479 commit a352c15
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scudo/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ pub struct GlobalScudoAllocator;
/// Returns `layout` or the minimum size/align layout for scudo if its too small.
fn fit_layout(layout: Layout) -> Layout {
// SAFETY: SCUDO_MIN_ALIGN is constant and known to be powers of 2.
let min_align = unsafe { SCUDO_MIN_ALIGN } as usize;
let min_align = unsafe { SCUDO_MIN_ALIGN };
let align = max(min_align, layout.align());
// SAFETY: Size and align are good by construction.
unsafe { Layout::from_size_align_unchecked(layout.size(), align) }
Expand Down

0 comments on commit a352c15

Please sign in to comment.