Format let-else statements

This commit is contained in:
Max Brunsfeld 2023-08-25 10:11:32 -07:00
parent 732af201dc
commit 404f76739c
28 changed files with 210 additions and 109 deletions

View file

@ -249,7 +249,9 @@ impl Database {
let mut tx = Arc::new(Some(tx));
let result = f(TransactionHandle(tx.clone())).await;
let Some(tx) = Arc::get_mut(&mut tx).and_then(|tx| tx.take()) else {
return Err(anyhow!("couldn't complete transaction because it's still in use"))?;
return Err(anyhow!(
"couldn't complete transaction because it's still in use"
))?;
};
Ok((tx, result))