fix clippy

This commit is contained in:
mpostma 2021-03-24 11:50:52 +01:00
parent 83ffdc888a
commit d892a2643e
No known key found for this signature in database
GPG Key ID: CBC8A7C1D7A28C3A
2 changed files with 3 additions and 3 deletions

View File

@ -323,7 +323,7 @@ impl<S: IndexStore + Sync + Send> IndexActor<S> {
})
.await
.map_err(|e| IndexError::Error(e.into()))?
.map_err(|e| IndexError::Error(e.into()))?;
.map_err(IndexError::Error)?;
}
Ok(())

View File

@ -107,7 +107,7 @@ pub fn load_snapshot(
db_path
.as_ref()
.canonicalize()
.unwrap_or(db_path.as_ref().to_owned())
.unwrap_or_else(|_| db_path.as_ref().to_owned())
)
} else if !snapshot_path.as_ref().exists() && !ignore_missing_snapshot {
bail!(
@ -115,7 +115,7 @@ pub fn load_snapshot(
snapshot_path
.as_ref()
.canonicalize()
.unwrap_or(snapshot_path.as_ref().to_owned())
.unwrap_or_else(|_| snapshot_path.as_ref().to_owned())
)
} else {
Ok(())