Skip to content

Commit

Permalink
Fix unsafe_op_in_unsafe_fn clippy lint from 2024 edition
Browse files Browse the repository at this point in the history
  • Loading branch information
fbernier committed Nov 27, 2024
1 parent 1c952a1 commit 7f57304
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -595,8 +595,10 @@ macro_rules! internal_encoder_fn {
];

write_idx = write_idx.wrapping_sub(1);
let ch = *VALUE_CHARACTERS.get_unchecked((u64_num % BASE) as usize);
*buf.get_unchecked_mut(write_idx) = ch;
unsafe {
let ch = *VALUE_CHARACTERS.get_unchecked((u64_num % BASE) as usize);
*buf.get_unchecked_mut(write_idx) = ch;
}

digit_index = digit_index.wrapping_add(1);
match digit_index {
Expand Down

0 comments on commit 7f57304

Please sign in to comment.