Skip to content

Commit

Permalink
Fix fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
oxalica committed Dec 31, 2022
1 parent 2e688f9 commit 4f8b44d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions crates/nil/src/vfs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,8 @@ impl Vfs {
if TextSize::of(text) < del_range.end() {
return Err(format!("Invalid range {:?}", del_range).into());
}
let mut buf = String::with_capacity(
text.len() - usize::from(del_range.len()) + ins_text.len(),
);
let mut buf =
String::with_capacity(text.len() - usize::from(del_range.len()) + ins_text.len());
buf += &text[..usize::from(del_range.start())];
buf += ins_text;
buf += &text[usize::from(del_range.end())..];
Expand Down

0 comments on commit 4f8b44d

Please sign in to comment.