about summary refs log tree commit diff
path: root/compiler/rustc_session/src
diff options
context:
space:
mode:
authorbjorn3 <17426603+bjorn3@users.noreply.github.com>2025-02-08 22:12:13 +0000
committerbjorn3 <17426603+bjorn3@users.noreply.github.com>2025-02-08 22:12:13 +0000
commit1fcae03369abb4c2cc180cd5a49e1f4440a81300 (patch)
treefe705ff77c286f5fc4c09acc98d2f124086d0479 /compiler/rustc_session/src
parent3183b44a1ec209b06e0c26cbc92217176b59dc76 (diff)
downloadrust-1fcae03369abb4c2cc180cd5a49e1f4440a81300.tar.gz
rust-1fcae03369abb4c2cc180cd5a49e1f4440a81300.zip
Rustfmt
Diffstat (limited to 'compiler/rustc_session/src')
-rw-r--r--compiler/rustc_session/src/config/native_libs/tests.rs40
-rw-r--r--compiler/rustc_session/src/search_paths.rs8
2 files changed, 20 insertions, 28 deletions
diff --git a/compiler/rustc_session/src/config/native_libs/tests.rs b/compiler/rustc_session/src/config/native_libs/tests.rs
index 3bcab93ef4b..287c98fe7eb 100644
--- a/compiler/rustc_session/src/config/native_libs/tests.rs
+++ b/compiler/rustc_session/src/config/native_libs/tests.rs
@@ -14,30 +14,22 @@ fn split() {
         (":bar", P { kind: None, modifiers: None, name: "", new_name: Some("bar") }),
         ("kind=foo", P { kind: Some("kind"), modifiers: None, name: "foo", new_name: None }),
         (":mods=foo", P { kind: Some(""), modifiers: Some("mods"), name: "foo", new_name: None }),
-        (":mods=:bar", P {
-            kind: Some(""),
-            modifiers: Some("mods"),
-            name: "",
-            new_name: Some("bar"),
-        }),
-        ("kind=foo:bar", P {
-            kind: Some("kind"),
-            modifiers: None,
-            name: "foo",
-            new_name: Some("bar"),
-        }),
-        ("kind:mods=foo", P {
-            kind: Some("kind"),
-            modifiers: Some("mods"),
-            name: "foo",
-            new_name: None,
-        }),
-        ("kind:mods=foo:bar", P {
-            kind: Some("kind"),
-            modifiers: Some("mods"),
-            name: "foo",
-            new_name: Some("bar"),
-        }),
+        (
+            ":mods=:bar",
+            P { kind: Some(""), modifiers: Some("mods"), name: "", new_name: Some("bar") },
+        ),
+        (
+            "kind=foo:bar",
+            P { kind: Some("kind"), modifiers: None, name: "foo", new_name: Some("bar") },
+        ),
+        (
+            "kind:mods=foo",
+            P { kind: Some("kind"), modifiers: Some("mods"), name: "foo", new_name: None },
+        ),
+        (
+            "kind:mods=foo:bar",
+            P { kind: Some("kind"), modifiers: Some("mods"), name: "foo", new_name: Some("bar") },
+        ),
         ("::==::", P { kind: Some(""), modifiers: Some(":"), name: "=", new_name: Some(":") }),
         ("==::==", P { kind: Some(""), modifiers: None, name: "=", new_name: Some(":==") }),
     ];
diff --git a/compiler/rustc_session/src/search_paths.rs b/compiler/rustc_session/src/search_paths.rs
index 78473fccd2d..b750d870cb6 100644
--- a/compiler/rustc_session/src/search_paths.rs
+++ b/compiler/rustc_session/src/search_paths.rs
@@ -140,10 +140,10 @@ impl SearchPath {
                     e.ok().and_then(|e| {
                         e.file_name().to_str().map(|s| {
                             let file_name_str: Arc<str> = s.into();
-                            (Arc::clone(&file_name_str), SearchPathFile {
-                                path: e.path().into(),
-                                file_name_str,
-                            })
+                            (
+                                Arc::clone(&file_name_str),
+                                SearchPathFile { path: e.path().into(), file_name_str },
+                            )
                         })
                     })
                 })