We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f51b681 commit beb293dCopy full SHA for beb293d
library/core/src/slice/mod.rs
@@ -1792,7 +1792,7 @@ impl<T> [T] {
1792
{
1793
// This function will need rewriting if and when SlicePattern becomes more sophisticated.
1794
let prefix = prefix.as_slice();
1795
- let n = prefix.as_slice().len();
+ let n = prefix.len();
1796
if n <= self.len() {
1797
let (head, tail) = self.split_at(n);
1798
if head == prefix {
0 commit comments