Skip to content

Commit 627891c

Browse files
ZenithsizThomas Bahn
and
Thomas Bahn
committed
Update src/ascii_str.rs
Co-authored-by: Thomas Bahn <thomas@thomas-bahn.net>
1 parent 8d239be commit 627891c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ascii_str.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -719,7 +719,7 @@ impl<'a> Iterator for Lines<'a> {
719719
} else {
720720
let line = self.string;
721721
// SAFETY: Slicing `..0` is always valid and yields an empty slice
722-
self.string = unsafe { self.string.as_slice().get_unchecked(..0).into() };
722+
self.string = unsafe { AsciiStr::from_ascii_unchecked(b"") };
723723
Some(line)
724724
}
725725
}

0 commit comments

Comments
 (0)