Skip to content

Commit

Permalink
Clippy feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
spacejam committed Jul 28, 2020
1 parent 3c7312a commit 9e566e7
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -397,9 +397,7 @@ impl TransactionalTrees {
// when the peg drops, it ensures all updates
// written to the log since its creation are
// recovered atomically
let ret = peg.seal_batch();

ret
peg.seal_batch()
}

fn flush_if_configured(&self) -> Result<()> {
Expand Down Expand Up @@ -452,7 +450,7 @@ pub trait Transactional<E = ()> {
let view = Self::view_overlay(&tt);

// NB locks must exist until this function returns.
let _locks = if let Ok(l) = tt.stage() {
let locks = if let Ok(l) = tt.stage() {
l
} else {
tt.unstage();
Expand All @@ -467,7 +465,7 @@ pub trait Transactional<E = ()> {
Ok(r) => {
let guard = pin();
tt.commit(&guard)?;
drop(_locks);
drop(locks);
tt.flush_if_configured()?;
return Ok(r);
}
Expand Down

0 comments on commit 9e566e7

Please sign in to comment.