Skip to content

Commit beb293d

Browse files
ijacksondtolnay
andcommitted
Drop pointless as_slice call.
Co-authored-by: David Tolnay <[email protected]>
1 parent f51b681 commit beb293d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/core/src/slice/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1792,7 +1792,7 @@ impl<T> [T] {
17921792
{
17931793
// This function will need rewriting if and when SlicePattern becomes more sophisticated.
17941794
let prefix = prefix.as_slice();
1795-
let n = prefix.as_slice().len();
1795+
let n = prefix.len();
17961796
if n <= self.len() {
17971797
let (head, tail) = self.split_at(n);
17981798
if head == prefix {

0 commit comments

Comments
 (0)