fix clippy warn

warning: the borrowed expression implements the required traits
This commit is contained in:
Dmitry Belyaev 2023-08-16 09:09:51 +03:00
parent 99f1b20fb5
commit aa3ba875dd
Signed by: b4tman
GPG Key ID: 41A00BF15EA7E5F3
1 changed files with 1 additions and 1 deletions

View File

@ -72,7 +72,7 @@ impl Config {
fn write<P: AsRef<Path>>(&self, path: P) -> Result<(), String> {
let data = toml::to_string_pretty(&self)
.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> {
let res = env::current_exe()