Fix needless_borrow
lints
This commit is contained in:
parent
8d90ffff1e
commit
0100b754f4
@ -210,14 +210,14 @@ where
|
|||||||
info!("Deleting cache and repository");
|
info!("Deleting cache and repository");
|
||||||
let cache_dir = format!("{}/{}.json", &state.cache(), repo);
|
let cache_dir = format!("{}/{}.json", &state.cache(), repo);
|
||||||
let repo_dir = format!("{}/{}", &state.repos(), repo);
|
let repo_dir = format!("{}/{}", &state.repos(), repo);
|
||||||
std::fs::remove_file(&cache_dir).or_else(|e| {
|
std::fs::remove_file(cache_dir).or_else(|e| {
|
||||||
if e.kind() == io::ErrorKind::NotFound {
|
if e.kind() == io::ErrorKind::NotFound {
|
||||||
Ok(())
|
Ok(())
|
||||||
} else {
|
} else {
|
||||||
Err(e)
|
Err(e)
|
||||||
}
|
}
|
||||||
})?;
|
})?;
|
||||||
std::fs::remove_dir_all(&repo_dir).or_else(|e| {
|
std::fs::remove_dir_all(repo_dir).or_else(|e| {
|
||||||
if e.kind() == io::ErrorKind::NotFound {
|
if e.kind() == io::ErrorKind::NotFound {
|
||||||
Ok(())
|
Ok(())
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user