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 425c56a + e640fa9 commit a0fa585Copy full SHA for a0fa585
crates/rust-analyzer/src/line_endings.rs
@@ -46,7 +46,7 @@ impl LineEndings {
46
return (src, LineEndings::Dos);
47
48
fn find_crlf(src: &[u8]) -> Option<usize> {
49
- src.iter().zip(src.iter().skip(1)).position(|it| it == (&b'\r', &b'\n'))
+ src.windows(2).position(|it| it == b"\r\n")
50
}
51
52
0 commit comments