about summary refs log tree commit diff
path: root/src/tools
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 /src/tools
parent67b0cfc761c9ad31a1dbacca36c42803b255f17a (diff)
Re-format let-else per rustfmt update
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/build_helper/src/git.rs8
-rw-r--r--src/tools/collect-license-metadata/src/path_tree.rs5
-rw-r--r--src/tools/compiletest/src/header.rs5
3 files changed, 14 insertions, 4 deletions
diff --git a/src/tools/build_helper/src/git.rs b/src/tools/build_helper/src/git.rs
index 168633c8f63..66876e02c19 100644
--- a/src/tools/build_helper/src/git.rs
+++ b/src/tools/build_helper/src/git.rs
@@ -94,7 +94,9 @@ pub fn get_git_modified_files(
     git_dir: Option<&Path>,
     extensions: &Vec<&str>,
 ) -> Result<Option<Vec<String>>, String> {
-    let Ok(updated_master) = updated_master_branch(git_dir) else { return Ok(None); };
+    let Ok(updated_master) = updated_master_branch(git_dir) else {
+        return Ok(None);
+    };
 
     let git = || {
         let mut git = Command::new("git");
@@ -119,7 +121,9 @@ pub fn get_git_modified_files(
 
 /// Returns the files that haven't been added to git yet.
 pub fn get_git_untracked_files(git_dir: Option<&Path>) -> Result<Option<Vec<String>>, String> {
-    let Ok(_updated_master) = updated_master_branch(git_dir) else { return Ok(None); };
+    let Ok(_updated_master) = updated_master_branch(git_dir) else {
+        return Ok(None);
+    };
     let mut git = Command::new("git");
     if let Some(git_dir) = git_dir {
         git.current_dir(git_dir);
diff --git a/src/tools/collect-license-metadata/src/path_tree.rs b/src/tools/collect-license-metadata/src/path_tree.rs
index 68b6cef6432..709d91897e6 100644
--- a/src/tools/collect-license-metadata/src/path_tree.rs
+++ b/src/tools/collect-license-metadata/src/path_tree.rs
@@ -155,7 +155,10 @@ impl Node<LicenseId> {
                         name: child_name,
                         children: child_children,
                         license: child_license,
-                    } = child else { continue };
+                    } = child
+                    else {
+                        continue;
+                    };
 
                     if child_license != license {
                         continue;
diff --git a/src/tools/compiletest/src/header.rs b/src/tools/compiletest/src/header.rs
index ad10c3e07ce..1779b26c422 100644
--- a/src/tools/compiletest/src/header.rs
+++ b/src/tools/compiletest/src/header.rs
@@ -599,7 +599,10 @@ pub fn line_directive<'line>(
         if ln.starts_with('[') {
             // A comment like `//[foo]` is specific to revision `foo`
             let Some(close_brace) = ln.find(']') else {
-                panic!("malformed condition directive: expected `{}[foo]`, found `{}`", comment, ln);
+                panic!(
+                    "malformed condition directive: expected `{}[foo]`, found `{}`",
+                    comment, ln
+                );
             };
 
             let lncfg = &ln[1..close_brace];