fix clippy warn
warning: the borrowed expression implements the required traits
This commit is contained in:
parent
99f1b20fb5
commit
aa3ba875dd
@ -72,7 +72,7 @@ impl Config {
|
|||||||
fn write<P: AsRef<Path>>(&self, path: P) -> Result<(), String> {
|
fn write<P: AsRef<Path>>(&self, path: P) -> Result<(), String> {
|
||||||
let data = toml::to_string_pretty(&self)
|
let data = toml::to_string_pretty(&self)
|
||||||
.map_err(|e| format!("can't serialize config: {:?}", e))?;
|
.map_err(|e| format!("can't serialize config: {:?}", e))?;
|
||||||
fs::write(path, &data).map_err(|e| format!("can't write config: {:?}", e))
|
fs::write(path, data).map_err(|e| format!("can't write config: {:?}", e))
|
||||||
}
|
}
|
||||||
fn file_location() -> Result<PathBuf, String> {
|
fn file_location() -> Result<PathBuf, String> {
|
||||||
let res = env::current_exe()
|
let res = env::current_exe()
|
||||||
|
Loading…
Reference in New Issue
Block a user