From beb293d5dfeb17e3dcf1ed348a665f33861691fe Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 27 Dec 2020 00:20:59 +0000 Subject: [PATCH] Drop pointless as_slice call. Co-authored-by: David Tolnay --- library/core/src/slice/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/core/src/slice/mod.rs b/library/core/src/slice/mod.rs index 5f1fe08fe810..1ab7d68805ab 100644 --- a/library/core/src/slice/mod.rs +++ b/library/core/src/slice/mod.rs @@ -1792,7 +1792,7 @@ impl [T] { { // This function will need rewriting if and when SlicePattern becomes more sophisticated. let prefix = prefix.as_slice(); - let n = prefix.as_slice().len(); + let n = prefix.len(); if n <= self.len() { let (head, tail) = self.split_at(n); if head == prefix {