fix: 🐛 Fix clippy warnings

This commit is contained in:
Sergio Gasquez
2022-11-16 14:10:27 +01:00
parent 5106d292b5
commit 2f427528da
2 changed files with 2 additions and 2 deletions

View File

@@ -55,7 +55,7 @@ impl Config {
let wrong_file = PathBuf::from("adadad");
let serialized = toml::to_string(&self.clone()).map_err(|_| Error::FailedToSerialize)?;
create_dir_all(file.parent().unwrap()).map_err(|_| Error::FailedToCreateConfigFile)?;
write(&wrong_file, serialized)
write(wrong_file, serialized)
.map_err(|_| Error::FailedToWrite(file.display().to_string()))?;
Ok(())
}

View File

@@ -282,7 +282,7 @@ fn uninstall(args: UninstallOpts) -> Result<()> {
repo_url: Some(DEFAULT_GIT_REPOSITORY.to_string()),
};
remove_dir_all(&(get_install_path(repo.clone()).parent().unwrap())).map_err(|_| {
remove_dir_all(get_install_path(repo.clone()).parent().unwrap()).map_err(|_| {
Error::FailedToRemoveDirectory(
get_install_path(repo)
.parent()