Lint & format
This commit is contained in:
parent
9da05c6ff6
commit
48f301d8ab
9 changed files with 54 additions and 57 deletions
|
|
@ -66,11 +66,9 @@ impl ExampleDocument {
|
|||
result.insert(
|
||||
result
|
||||
.char_indices()
|
||||
.skip(cursor.char_index + i)
|
||||
.next()
|
||||
.map(|(byte_index, _)| byte_index)
|
||||
.unwrap_or_else(|| result.len()), /* find the utf8 char index of the insert
|
||||
* in byte index */
|
||||
.nth(cursor.char_index + i)
|
||||
.map_or_else(|| result.len(), |(byte_index, _)| byte_index), /* find the utf8 char index of the insert
|
||||
* in byte index */
|
||||
'|',
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue