mirror of https://github.com/zkat/cacache-rs.git
nit: use if let Some() here
This commit is contained in:
parent
257fc9b6d0
commit
e5aeb669b4
|
|
@ -109,8 +109,7 @@ pub fn find(cache: &Path, key: &str) -> Result<Option<Entry>, Error> {
|
|||
let bucket = bucket_path(cache, &key);
|
||||
Ok(bucket_entries(&bucket)?.into_iter().fold(None, |acc, entry| {
|
||||
if entry.key == key {
|
||||
if entry.integrity.is_some() {
|
||||
let integrity = entry.integrity.unwrap();
|
||||
if let Some(integrity) = entry.integrity {
|
||||
let integrity: Integrity = match integrity.parse() {
|
||||
Ok(sri) => sri,
|
||||
_ => return acc
|
||||
|
|
|
|||
Loading…
Reference in New Issue