mirror of
https://github.com/bootandy/dust.git
synced 2025-12-12 15:49:58 -08:00
clippy
This commit is contained in:
@@ -258,16 +258,15 @@ pub fn get_config(conf_path: Option<String>) -> Config {
|
|||||||
Some(path_str) => {
|
Some(path_str) => {
|
||||||
let path = Path::new(&path_str);
|
let path = Path::new(&path_str);
|
||||||
if path.exists() {
|
if path.exists() {
|
||||||
match Config::from_config_file(&path) {
|
match Config::from_config_file(path) {
|
||||||
Ok(config) => return config,
|
Ok(config) => return config,
|
||||||
Err(e) => eprintln!(
|
Err(e) => {
|
||||||
"Ignoring invalid config file ({}): {:?}",
|
eprintln!("Ignoring invalid config file '{}': {}", &path.display(), e)
|
||||||
&path.display(),
|
}
|
||||||
e
|
|
||||||
),
|
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
eprintln!("Config file {:?} doesn't exists", &path.display());
|
||||||
}
|
}
|
||||||
eprintln!("Config file {:?} doesn't exists", &path.display());
|
|
||||||
}
|
}
|
||||||
None => {
|
None => {
|
||||||
if let Some(home) = directories::BaseDirs::new() {
|
if let Some(home) = directories::BaseDirs::new() {
|
||||||
|
|||||||
Reference in New Issue
Block a user