diff options
| author | 2022-07-19 15:36:21 +0200 | |
|---|---|---|
| committer | 2022-07-19 15:36:21 +0200 | |
| commit | ae0f12e668cfd37728aad907c813431595e6cc1b (patch) | |
| tree | 3cdc7282643656633a11c992cd7d1d050924dadc /src/util | |
| parent | c4cd482fd5006cde338e49104f2abdbd20fd644d (diff) | |
| download | markdown-rs-ae0f12e668cfd37728aad907c813431595e6cc1b.tar.gz markdown-rs-ae0f12e668cfd37728aad907c813431595e6cc1b.tar.bz2 markdown-rs-ae0f12e668cfd37728aad907c813431595e6cc1b.zip | |
Use `edit_map` in `subtokenize`
Diffstat (limited to 'src/util')
| -rw-r--r-- | src/util/edit_map.rs | 15 | 
1 files changed, 1 insertions, 14 deletions
| diff --git a/src/util/edit_map.rs b/src/util/edit_map.rs index eda767a..90ff483 100644 --- a/src/util/edit_map.rs +++ b/src/util/edit_map.rs @@ -107,20 +107,7 @@ impl EditMap {                  next_events.append(append);              } -            if !add.is_empty() { -                let append = &mut add; -                let mut index = 0; - -                while index < append.len() { -                    let event = &mut append[index]; -                    assert!(event.previous.is_none(), "to do?"); -                    assert!(event.next.is_none(), "to do?"); -                    index += 1; -                } - -                next_events.append(append); -            } - +            next_events.append(&mut add);              start = at + remove;              index += 1;          } | 
