about summary refs log tree commit diff
path: root/compiler/rustc_codegen_gcc/build_system/src/utils.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-07-18 03:43:44 +0000
committerbors <bors@rust-lang.org>2024-07-18 03:43:44 +0000
commit4bb2f278617e5498ac9a4776d3e1268154c500c5 (patch)
tree2628c5a549843f206eb54df0a2bc96bb83044f61 /compiler/rustc_codegen_gcc/build_system/src/utils.rs
parente35364a521372ce682e4bd4a5850d97ea33b0eab (diff)
parent7c63526b70c99e44d1645b743c29163d06a4d756 (diff)
downloadrust-4bb2f278617e5498ac9a4776d3e1268154c500c5.tar.gz
rust-4bb2f278617e5498ac9a4776d3e1268154c500c5.zip
Auto merge of #127892 - tgross35:rollup-7j9wkzc, r=tgross35
Rollup of 9 pull requests

Successful merges:

 - #127542 ([`macro_metavar_expr_concat`] Add support for literals)
 - #127652 (Unignore cg_gcc fmt)
 - #127664 (Fix precise capturing suggestion for hidden regions when we have APITs)
 - #127806 (Some parser improvements)
 - #127828 (Commonize `uname -m` results for `aarch64` in docker runner)
 - #127845 (unix: break `stack_overflow::install_main_guard` into smaller fn)
 - #127859 (ptr::metadata: avoid references to extern types)
 - #127861 (Document the column numbers for the dbg! macro)
 - #127875 (style-guide: Clarify version-sorting)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_codegen_gcc/build_system/src/utils.rs')
-rw-r--r--compiler/rustc_codegen_gcc/build_system/src/utils.rs6
1 files changed, 1 insertions, 5 deletions
diff --git a/compiler/rustc_codegen_gcc/build_system/src/utils.rs b/compiler/rustc_codegen_gcc/build_system/src/utils.rs
index 3bba8df6c65..e338d1b4992 100644
--- a/compiler/rustc_codegen_gcc/build_system/src/utils.rs
+++ b/compiler/rustc_codegen_gcc/build_system/src/utils.rs
@@ -175,11 +175,7 @@ pub fn cargo_install(to_install: &str) -> Result<(), String> {
 pub fn get_os_name() -> Result<String, String> {
     let output = run_command(&[&"uname"], None)?;
     let name = std::str::from_utf8(&output.stdout).unwrap_or("").trim().to_string();
-    if !name.is_empty() {
-        Ok(name)
-    } else {
-        Err("Failed to retrieve the OS name".to_string())
-    }
+    if !name.is_empty() { Ok(name) } else { Err("Failed to retrieve the OS name".to_string()) }
 }
 
 #[derive(Default, PartialEq)]