Skip to content

Commit 0d0a290

Browse files
committed
auto merge of #19134 : sinistersnare/rust/patch-2, r=alexcrichton
Vec<T> can index now so its a useless conversion.
2 parents caec7b0 + fb67b05 commit 0d0a290

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
@@ -1858,7 +1858,6 @@ pub trait StrPrelude for Sized? {
18581858
/// ```rust
18591859
/// let string = "a\nb\nc";
18601860
/// let lines: Vec<&str> = string.lines().collect();
1861-
/// let lines = lines.as_slice();
18621861
///
18631862
/// assert!(string.subslice_offset(lines[0]) == 0); // &"a"
18641863
/// assert!(string.subslice_offset(lines[1]) == 2); // &"b"

0 commit comments

Comments
 (0)