|
|
@@ -27,7 +27,7 @@ impl Config {
|
|
27
|
27
|
if let Ok(path) = xdg_dirs.place_config_file("config.toml") {
|
|
28
|
28
|
if let Ok(mut file) = File::create(&path) {
|
|
29
|
29
|
println!("write default config {:?}", &path);
|
|
30
|
|
- file.write_all(DEFAULT_CONFIG.as_bytes());
|
|
|
30
|
+ let _ = file.write_all(DEFAULT_CONFIG.as_bytes());
|
|
31
|
31
|
}
|
|
32
|
32
|
}
|
|
33
|
33
|
|
|
|
@@ -95,7 +95,7 @@ impl Config {
|
|
95
|
95
|
.as_str()
|
|
96
|
96
|
.ok_or_else(|| "extension has to be a string".to_string())?;
|
|
97
|
97
|
|
|
98
|
|
- if name.contains("/") || name.contains("\\") {
|
|
|
98
|
+ if name.contains('/') || name.contains('\\') {
|
|
99
|
99
|
return Err(format!("source name ({:?}) must not contain slashes (\"/\" or \"\\\")", name));
|
|
100
|
100
|
}
|
|
101
|
101
|
|