Skip to content

Commit 889df0e

Browse files
committed
chore: removed redundant trait implementations
1 parent 005c023 commit 889df0e

File tree

2 files changed

+4
-32
lines changed

2 files changed

+4
-32
lines changed

src/transaction.rs

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -491,34 +491,6 @@ pub trait Transactional<E = ()> {
491491
}
492492
}
493493

494-
impl<E> Transactional<E> for &Tree {
495-
type View = TransactionalTree;
496-
497-
fn make_overlay(&self) -> Result<TransactionalTrees> {
498-
Ok(TransactionalTrees {
499-
inner: vec![TransactionalTree::from_tree(self)],
500-
})
501-
}
502-
503-
fn view_overlay(overlay: &TransactionalTrees) -> Self::View {
504-
overlay.inner[0].clone()
505-
}
506-
}
507-
508-
impl<E> Transactional<E> for &&Tree {
509-
type View = TransactionalTree;
510-
511-
fn make_overlay(&self) -> Result<TransactionalTrees> {
512-
Ok(TransactionalTrees {
513-
inner: vec![TransactionalTree::from_tree(*self)],
514-
})
515-
}
516-
517-
fn view_overlay(overlay: &TransactionalTrees) -> Self::View {
518-
overlay.inner[0].clone()
519-
}
520-
}
521-
522494
impl<E> Transactional<E> for Tree {
523495
type View = TransactionalTree;
524496

src/tree.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ const fn bounds_error() -> Result<()> {
4242
Err(Error::Unsupported(
4343
"Keys and values are limited to \
4444
128gb on 64-bit platforms and
45-
512mb on 32-bit platforms."
45+
512mb on 32-bit platforms.",
4646
))
4747
}
4848

@@ -373,7 +373,7 @@ impl Tree {
373373
&transaction::TransactionalTree,
374374
) -> transaction::ConflictableTransactionResult<A, E>,
375375
{
376-
Transactional::transaction(&self, f)
376+
Transactional::transaction(self, f)
377377
}
378378

379379
/// Create a new batched update that can be
@@ -948,7 +948,7 @@ impl Tree {
948948
} else {
949949
Err(Error::ReportableBug(
950950
"threadpool failed to complete \
951-
action before shutdown"
951+
action before shutdown",
952952
))
953953
}
954954
}
@@ -1163,7 +1163,7 @@ impl Tree {
11631163
return Err(Error::Unsupported(
11641164
"must set a merge operator on this Tree \
11651165
before calling merge by calling \
1166-
Tree::set_merge_operator"
1166+
Tree::set_merge_operator",
11671167
));
11681168
}
11691169

0 commit comments

Comments
 (0)