about summary refs log tree commit diff
path: root/library/core/src
diff options
context:
space:
mode:
authorMark Rousskov <mark.simulacrum@gmail.com>2023-07-12 21:49:27 -0400
committerMark Rousskov <mark.simulacrum@gmail.com>2023-07-12 21:49:27 -0400
commitcc907f80b95c6ec530c5ee1b05b044a468f07eca (patch)
tree47015a30be181fdb089b7daa4b8f18e9bb1d62f2 /library/core/src
parent67b0cfc761c9ad31a1dbacca36c42803b255f17a (diff)
downloadrust-cc907f80b95c6ec530c5ee1b05b044a468f07eca.tar.gz
rust-cc907f80b95c6ec530c5ee1b05b044a468f07eca.zip
Re-format let-else per rustfmt update
Diffstat (limited to 'library/core/src')
-rw-r--r--library/core/src/array/mod.rs2
-rw-r--r--library/core/src/str/pattern.rs4
2 files changed, 4 insertions, 2 deletions
diff --git a/library/core/src/array/mod.rs b/library/core/src/array/mod.rs
index 76b3589b9e4..ebd4a8c05fe 100644
--- a/library/core/src/array/mod.rs
+++ b/library/core/src/array/mod.rs
@@ -925,7 +925,7 @@ fn iter_next_chunk_erased<T>(
             // so we need to defuse the guard instead of using `?`.
             let initialized = guard.initialized;
             mem::forget(guard);
-            return Err(initialized)
+            return Err(initialized);
         };
 
         // SAFETY: The loop condition ensures we have space to push the item
diff --git a/library/core/src/str/pattern.rs b/library/core/src/str/pattern.rs
index 91ee2903aab..d5d6d60acf6 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;