Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 0 additions & 28 deletions src/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -491,34 +491,6 @@ pub trait Transactional<E = ()> {
}
}

impl<E> Transactional<E> for &Tree {
type View = TransactionalTree;

fn make_overlay(&self) -> Result<TransactionalTrees> {
Ok(TransactionalTrees {
inner: vec![TransactionalTree::from_tree(self)],
})
}

fn view_overlay(overlay: &TransactionalTrees) -> Self::View {
overlay.inner[0].clone()
}
}

impl<E> Transactional<E> for &&Tree {
type View = TransactionalTree;

fn make_overlay(&self) -> Result<TransactionalTrees> {
Ok(TransactionalTrees {
inner: vec![TransactionalTree::from_tree(*self)],
})
}

fn view_overlay(overlay: &TransactionalTrees) -> Self::View {
overlay.inner[0].clone()
}
}

impl<E> Transactional<E> for Tree {
type View = TransactionalTree;

Expand Down
8 changes: 4 additions & 4 deletions src/tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const fn bounds_error() -> Result<()> {
Err(Error::Unsupported(
"Keys and values are limited to \
128gb on 64-bit platforms and
512mb on 32-bit platforms."
512mb on 32-bit platforms.",
))
}

Expand Down Expand Up @@ -373,7 +373,7 @@ impl Tree {
&transaction::TransactionalTree,
) -> transaction::ConflictableTransactionResult<A, E>,
{
Transactional::transaction(&self, f)
Transactional::transaction(self, f)
}

/// Create a new batched update that can be
Expand Down Expand Up @@ -948,7 +948,7 @@ impl Tree {
} else {
Err(Error::ReportableBug(
"threadpool failed to complete \
action before shutdown"
action before shutdown",
))
}
}
Expand Down Expand Up @@ -1163,7 +1163,7 @@ impl Tree {
return Err(Error::Unsupported(
"must set a merge operator on this Tree \
before calling merge by calling \
Tree::set_merge_operator"
Tree::set_merge_operator",
));
}

Expand Down