mirror of
https://github.com/ClementTsang/bottom
synced 2024-11-23 20:53:07 +00:00
rust fmt
This commit is contained in:
parent
622703f4b6
commit
6a1fa8f379
1 changed files with 5 additions and 7 deletions
12
src/main.rs
12
src/main.rs
|
@ -18,8 +18,7 @@ use crossterm::{
|
||||||
},
|
},
|
||||||
execute,
|
execute,
|
||||||
style::Print,
|
style::Print,
|
||||||
terminal::LeaveAlternateScreen,
|
terminal::{disable_raw_mode, enable_raw_mode, EnterAlternateScreen, LeaveAlternateScreen},
|
||||||
terminal::{disable_raw_mode, enable_raw_mode, EnterAlternateScreen},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
use std::{
|
use std::{
|
||||||
|
@ -425,10 +424,7 @@ fn create_logger() -> error::Result<()> {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn create_config(flag_config_location: Option<&str>) -> error::Result<Config> {
|
fn create_config(flag_config_location: Option<&str>) -> error::Result<Config> {
|
||||||
use std::{
|
use std::{ffi::OsString, fs};
|
||||||
ffi::OsString,
|
|
||||||
fs
|
|
||||||
};
|
|
||||||
let config_path = if let Some(conf_loc) = flag_config_location {
|
let config_path = if let Some(conf_loc) = flag_config_location {
|
||||||
OsString::from(conf_loc)
|
OsString::from(conf_loc)
|
||||||
} else if cfg!(target_os = "windows") {
|
} else if cfg!(target_os = "windows") {
|
||||||
|
@ -512,7 +508,9 @@ fn get_temperature_option(
|
||||||
}
|
}
|
||||||
_ => {
|
_ => {
|
||||||
return Err(BottomError::ConfigError(
|
return Err(BottomError::ConfigError(
|
||||||
"Invalid temperature type. Please have the value be of the form <kelvin|k|celsius|c|fahrenheit|f>".to_string()
|
"Invalid temperature type. Please have the value be of the form \
|
||||||
|
<kelvin|k|celsius|c|fahrenheit|f>"
|
||||||
|
.to_string(),
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue