mirror of
https://github.com/NotAShelf/microfetch.git
synced 2025-11-25 16:52:50 +00:00
refactor: clean up a few things
I've decided to keep lazy_static for now as std::sync::LazyLock seems to have a slightly bigger impact on binary size.
This commit is contained in:
parent
671ce6b8e5
commit
c139026704
5 changed files with 16 additions and 17 deletions
|
|
@ -4,13 +4,13 @@ use std::{
|
|||
io::{self, BufRead, BufReader},
|
||||
};
|
||||
|
||||
pub fn get_system_info(utsname: &UtsName) -> nix::Result<String> {
|
||||
Ok(format!(
|
||||
pub fn get_system_info(utsname: &UtsName) -> String {
|
||||
format!(
|
||||
"{} {} ({})",
|
||||
utsname.sysname().to_str().unwrap_or("Unknown"),
|
||||
utsname.release().to_str().unwrap_or("Unknown"),
|
||||
utsname.machine().to_str().unwrap_or("Unknown")
|
||||
))
|
||||
)
|
||||
}
|
||||
|
||||
pub fn get_os_pretty_name() -> Result<String, io::Error> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue