Drop pointless as_slice call.
Co-authored-by: David Tolnay <dtolnay@gmail.com>
This commit is contained in:
parent
f51b68199c
commit
beb293d5df
1 changed files with 1 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue