ref(logging): remove LogExt::log_or_ok (#4250)

This further reduces the cognitive overload of having many ways to do
something.  The same is very easily done using composition.  Followup
from 82ace72527.
This commit is contained in:
Floris Bruynooghe
2023-03-31 12:15:17 +02:00
committed by GitHub
parent fd7cc83537
commit 61b8d04418
7 changed files with 22 additions and 40 deletions

View File

@@ -92,7 +92,7 @@ impl<'a> BlobObject<'a> {
if attempt >= MAX_ATTEMPT {
return Err(err).context("failed to create file");
} else if attempt == 1 && !dir.exists() {
fs::create_dir_all(dir).await.ok_or_log(context);
fs::create_dir_all(dir).await.log_err(context).ok();
} else {
name = format!("{}-{}{}", stem, rand::random::<u32>(), ext);
}