We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e812605 commit 73b6b7aCopy full SHA for 73b6b7a
src/release.rs
@@ -1,4 +1,4 @@
1
-use std::{fmt::Write as _, io};
+use std::io;
2
3
use crate::{UtsName, syscall::read_file_fast};
4
@@ -13,7 +13,13 @@ pub fn get_system_info(utsname: &UtsName) -> String {
13
let capacity = sysname.len() + 1 + release.len() + 2 + machine.len() + 1;
14
let mut result = String::with_capacity(capacity);
15
16
- write!(result, "{sysname} {release} ({machine})").unwrap();
+ result.push_str(sysname);
17
+ result.push(' ');
18
+ result.push_str(release);
19
20
+ result.push('(');
21
+ result.push_str(machine);
22
+ result.push(')');
23
result
24
}
25
0 commit comments