Skip to content

Commit

Permalink
fix: SlicedBytes
Browse files Browse the repository at this point in the history
  • Loading branch information
EqualMa committed Mar 20, 2023
1 parent 190dda2 commit 9e0f42c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/frender-ssr/src/bytes/sliced.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ impl AsRef<[u8]> for SlicedBytes {

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

0 comments on commit 9e0f42c

Please sign in to comment.