Apply cargo fmt
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Valentin Brandl 2023-06-13 10:26:25 +02:00
parent 4ce8c9e523
commit 9f3c2813ab
2 changed files with 6 additions and 11 deletions

View File

@ -36,10 +36,7 @@ impl<'a> CacheState<'a> {
trace!("Reading cache");
if path.as_ref().exists() {
let cache: Cache = serde_json::from_reader(BufReader::new(File::open(path)?))?;
Ok(cache
.entries
.get(branch)
.map_or_else(
Ok(cache.entries.get(branch).map_or_else(
// TODO: get rid of clone
|| CacheState::NoneForBranch(cache.clone()),
|c| {
@ -59,8 +56,8 @@ impl<'a> CacheState<'a> {
cache: cache.clone(),
}
}
})
)
},
))
} else {
Ok(CacheState::No)
}

View File

@ -501,9 +501,7 @@ async fn static_file(
.content_type(data.mime.clone())
.body(data.content)
})
.map_or_else(
|| p404(&repo_count),
Result::Ok)
.map_or_else(|| p404(&repo_count), Result::Ok)
}
#[get("/favicon.ico")]