diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2020-02-26 22:42:29 +0100 |
|---|---|---|
| committer | Matthias Krüger <matthias.krueger@famsik.de> | 2020-02-26 22:42:29 +0100 |
| commit | 280e381b8d515a534c053b2bda83e5c6902c4a96 (patch) | |
| tree | e6dd647276d4e4dcbe9209b341e5cbeca350bc96 /src/libcore/str | |
| parent | abc3073c92df034636a823c5382ece2186d22b9e (diff) | |
| download | rust-280e381b8d515a534c053b2bda83e5c6902c4a96.tar.gz rust-280e381b8d515a534c053b2bda83e5c6902c4a96.zip | |
don't take redundant references to operands
Diffstat (limited to 'src/libcore/str')
| -rw-r--r-- | src/libcore/str/pattern.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libcore/str/pattern.rs b/src/libcore/str/pattern.rs index ef64d8b0fdf..6c826e5dcde 100644 --- a/src/libcore/str/pattern.rs +++ b/src/libcore/str/pattern.rs @@ -1050,7 +1050,7 @@ impl TwoWaySearcher { // &v[..period]. If it is, we use "Algorithm CP1". Otherwise we use // "Algorithm CP2", which is optimized for when the period of the needle // is large. - if &needle[..crit_pos] == &needle[period..period + crit_pos] { + if needle[..crit_pos] == needle[period..period + crit_pos] { // short period case -- the period is exact // compute a separate critical factorization for the reversed needle // x = u' v' where |v'| < period(x). |
