Skip to content

Commit

Permalink
perf: use with_size_unchecked in Byteview::new
Browse files Browse the repository at this point in the history
  • Loading branch information
marvin-j97 committed Jan 26, 2025
1 parent 245babe commit f337940
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/byteview.rs
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ impl ByteView {
pub fn new(slice: &[u8]) -> Self {
let slice_len = slice.len();

let mut view = Self::with_size(slice_len);
let mut view = Self::with_size_unchecked(slice_len);

if view.is_inline() {
// SAFETY: We check for inlinability
Expand Down

0 comments on commit f337940

Please sign in to comment.