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.
1 parent b38b483 commit 24d5104Copy full SHA for 24d5104
src/ascii_str.rs
@@ -719,7 +719,7 @@ impl<'a> Iterator for Lines<'a> {
719
} else {
720
let line = self.string;
721
// SAFETY: Slicing `..0` is always valid and yields an empty slice
722
- self.string = unsafe { self.string.as_slice().get_unchecked(..0).into() };
+ self.string = unsafe { AsciiStr::from_ascii_unchecked(b"") };
723
Some(line)
724
}
725
0 commit comments