From fb67b055061b8e41ca111a5897731bd0b70a7b63 Mon Sep 17 00:00:00 2001 From: Davis Silverman Date: Thu, 20 Nov 2014 01:34:14 -0500 Subject: [PATCH] Removed unneeded conversion to a slice. Vec can index now so its a useless conversion. --- src/libcore/str.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/libcore/str.rs b/src/libcore/str.rs index 24f26b15f27ac..4608ffd1358cb 100644 --- a/src/libcore/str.rs +++ b/src/libcore/str.rs @@ -1836,7 +1836,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"