mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-04 19:12:50 +00:00
Drop pointless as_slice call.
Co-authored-by: David Tolnay <dtolnay@gmail.com>
This commit is contained in:
parent
f51b68199c
commit
beb293d5df
@ -1792,7 +1792,7 @@ impl<T> [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 {
|
||||
|
Loading…
Reference in New Issue
Block a user