mirror of
https://github.com/crate-ci/typos.git
synced 2025-01-09 00:04:49 -05:00
perf(parser): Limit inner-loop assers
This commit is contained in:
parent
287c4cbfe9
commit
09d2124d0f
1 changed files with 2 additions and 2 deletions
|
@ -185,7 +185,7 @@ mod parser {
|
|||
std::iter::from_fn(move || match next_literal(input) {
|
||||
Ok((i, o)) => {
|
||||
input = i;
|
||||
assert_ne!(o, "");
|
||||
debug_assert_ne!(o, "");
|
||||
Some(o)
|
||||
}
|
||||
_ => None,
|
||||
|
@ -333,7 +333,7 @@ impl<'s> Iterator for SplitIdent<'s> {
|
|||
while let Some((i, c)) = self.char_indices.next() {
|
||||
let cur_mode = WordMode::classify(c);
|
||||
if cur_mode == WordMode::Boundary {
|
||||
assert!(self.start_mode == WordMode::Boundary);
|
||||
debug_assert!(self.start_mode == WordMode::Boundary);
|
||||
continue;
|
||||
}
|
||||
if self.start_mode == WordMode::Boundary {
|
||||
|
|
Loading…
Reference in a new issue