mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 13:29:12 +00:00
Drop a redundant debug_assert!
This commit is contained in:
parent
2354ca7cbe
commit
4d18d625a2
1 changed files with 3 additions and 1 deletions
|
@ -242,9 +242,11 @@ impl<'a> Src64<'a> {
|
||||||
// we should be able to prefetch the others in the tokenization loop before it needs to read them.
|
// we should be able to prefetch the others in the tokenization loop before it needs to read them.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// We may have coincidentally had a file size that was a multiple of 64, but if not,
|
||||||
|
// we'll need to fill the allocation with trailing newlines so we aren't tokenizing
|
||||||
|
// uninitialized memory.
|
||||||
if capacity > file_size {
|
if capacity > file_size {
|
||||||
debug_assert!(capacity - file_size < 64);
|
debug_assert!(capacity - file_size < 64);
|
||||||
debug_assert!(capacity - file_size > 0);
|
|
||||||
let trailing_newlines_needed = capacity - file_size;
|
let trailing_newlines_needed = capacity - file_size;
|
||||||
|
|
||||||
// Safety: `buf_ptr` has a length of `capacity`, which has been rounded up to a multiple of 64.
|
// Safety: `buf_ptr` has a length of `capacity`, which has been rounded up to a multiple of 64.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue