Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit fb67b05

Browse files
committedNov 20, 2014
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"

5 commit comments

Comments
 (5)

bors commented on Nov 22, 2014

@bors
Collaborator

saw approval from alexcrichton
at sinistersnare@fb67b05

bors commented on Nov 22, 2014

@bors
Collaborator

merging sinistersnare/rust/patch-2 = fb67b05 into auto

bors commented on Nov 22, 2014

@bors
Collaborator

sinistersnare/rust/patch-2 = fb67b05 merged ok, testing candidate = 0d0a290

bors commented on Nov 22, 2014

@bors
Collaborator

fast-forwarding master to auto = 0d0a290

Please sign in to comment.