Format let-else statements
This commit is contained in:
parent
732af201dc
commit
404f76739c
28 changed files with 210 additions and 109 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue