Skip to content

Commit 73b6b7a

Browse files
committed
get rid of formatting in release module
1 parent e812605 commit 73b6b7a

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/release.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use std::{fmt::Write as _, io};
1+
use std::io;
22

33
use crate::{UtsName, syscall::read_file_fast};
44

@@ -13,7 +13,13 @@ pub fn get_system_info(utsname: &UtsName) -> String {
1313
let capacity = sysname.len() + 1 + release.len() + 2 + machine.len() + 1;
1414
let mut result = String::with_capacity(capacity);
1515

16-
write!(result, "{sysname} {release} ({machine})").unwrap();
16+
result.push_str(sysname);
17+
result.push(' ');
18+
result.push_str(release);
19+
result.push(' ');
20+
result.push('(');
21+
result.push_str(machine);
22+
result.push(')');
1723
result
1824
}
1925

0 commit comments

Comments
 (0)