Skip to content

Commit f337940

Browse files
committed
perf: use with_size_unchecked in Byteview::new
1 parent 245babe commit f337940

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/byteview.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ impl ByteView {
385385
pub fn new(slice: &[u8]) -> Self {
386386
let slice_len = slice.len();
387387

388-
let mut view = Self::with_size(slice_len);
388+
let mut view = Self::with_size_unchecked(slice_len);
389389

390390
if view.is_inline() {
391391
// SAFETY: We check for inlinability

0 commit comments

Comments
 (0)