Skip to content

Commit 9e0f42c

Browse files
committed
fix: SlicedBytes
1 parent 190dda2 commit 9e0f42c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/frender-ssr/src/bytes/sliced.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ impl AsRef<[u8]> for SlicedBytes {
2121

2222
impl super::AsyncWritableBytes for SlicedBytes {
2323
fn truncate_start_at(&mut self, n: usize) {
24-
assert!(n < self.inner.len());
24+
assert!(n + self.start <= self.inner.len());
2525
self.start += n;
2626
}
2727
}

0 commit comments

Comments
 (0)