fix arithmetic side-effects
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
52a561ff9e
commit
7397064edd
25 changed files with 139 additions and 114 deletions
|
@ -26,7 +26,7 @@ impl fmt::Display for Escape<'_> {
|
|||
fmt.write_str(s)?;
|
||||
// NOTE: we only expect single byte characters here - which is fine as long as
|
||||
// we only match single byte characters
|
||||
last = i + 1;
|
||||
last = i.saturating_add(1);
|
||||
}
|
||||
|
||||
if last < s.len() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue