Skip to content

Commit fb67b05

Browse files
committed
Removed unneeded conversion to a slice.
Vec<T> can index now so its a useless conversion.
1 parent 7936242 commit fb67b05

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

src/libcore/str.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1836,7 +1836,6 @@ pub trait StrPrelude for Sized? {
18361836
/// ```rust
18371837
/// let string = "a\nb\nc";
18381838
/// let lines: Vec<&str> = string.lines().collect();
1839-
/// let lines = lines.as_slice();
18401839
///
18411840
/// assert!(string.subslice_offset(lines[0]) == 0); // &"a"
18421841
/// assert!(string.subslice_offset(lines[1]) == 2); // &"b"

0 commit comments

Comments
 (0)