auto merge of #19134 : sinistersnare/rust/patch-2, r=alexcrichton
Vec<T> can index now so its a useless conversion.
This commit is contained in:
commit
0d0a290614
1 changed files with 0 additions and 1 deletions
|
|
@ -1858,7 +1858,6 @@ pub trait StrPrelude for Sized? {
|
|||
/// ```rust
|
||||
/// let string = "a\nb\nc";
|
||||
/// let lines: Vec<&str> = string.lines().collect();
|
||||
/// let lines = lines.as_slice();
|
||||
///
|
||||
/// assert!(string.subslice_offset(lines[0]) == 0); // &"a"
|
||||
/// assert!(string.subslice_offset(lines[1]) == 2); // &"b"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue