Commit 49960ad
committed
Streamline StringReader::bump.
First, assert! is redundant w.r.t. the unwrap() immediately afterwards.
Second, `byte_offset_diff` is effectively computed as
`current_byte_offset + ch.len_utf8() - current_byte_offset` (with `next`
as an intermediate) which is silly and can be simplified.1 parent 144af3e commit 49960ad
1 file changed
+1
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
417 | 417 | | |
418 | 418 | | |
419 | 419 | | |
420 | | - | |
421 | 420 | | |
422 | 421 | | |
423 | | - | |
424 | | - | |
| 422 | + | |
425 | 423 | | |
426 | 424 | | |
427 | 425 | | |
| |||
0 commit comments