summaryrefslogtreecommitdiffstats
path: root/library/core/src/str/pattern.rs
diff options
context:
space:
mode:
Diffstat (limited to 'library/core/src/str/pattern.rs')
-rw-r--r--library/core/src/str/pattern.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/library/core/src/str/pattern.rs b/library/core/src/str/pattern.rs
index 91ee2903a..d5d6d60ac 100644
--- a/library/core/src/str/pattern.rs
+++ b/library/core/src/str/pattern.rs
@@ -1750,7 +1750,9 @@ fn simd_contains(needle: &str, haystack: &str) -> Option<bool> {
1
} else {
// try a few bytes in case first and last byte of the needle are the same
- let Some(second_probe_offset) = (needle.len().saturating_sub(4)..needle.len()).rfind(|&idx| needle[idx] != first_probe) else {
+ let Some(second_probe_offset) =
+ (needle.len().saturating_sub(4)..needle.len()).rfind(|&idx| needle[idx] != first_probe)
+ else {
// fall back to other search methods if we can't find any different bytes
// since we could otherwise hit some degenerate cases
return None;