We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 45db7ad + 1d4efff commit 41c28b5Copy full SHA for 41c28b5
src/tools/rust-analyzer/crates/rust-analyzer/src/line_index.rs
@@ -62,8 +62,8 @@ impl LineEndings {
62
63
// Account for removed `\r`.
64
// After `set_len`, `buf` is guaranteed to contain utf-8 again.
65
+ let new_len = buf.len() - gap_len;
66
let src = unsafe {
- let new_len = buf.len() - gap_len;
67
buf.set_len(new_len);
68
String::from_utf8_unchecked(buf)
69
};
0 commit comments