From 4364a8c2022ca5b041e1c261b86593a2c2814321 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Nieto?= Date: Sat, 11 Nov 2023 19:02:23 +0100 Subject: [PATCH] chore: removed redundant trait implementations --- src/transaction.rs | 56 +++++++++++++++++++++++----------------------- src/tree.rs | 2 +- 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/src/transaction.rs b/src/transaction.rs index a2bd6e69f..c3a36ed48 100644 --- a/src/transaction.rs +++ b/src/transaction.rs @@ -490,34 +490,34 @@ pub trait Transactional { } } } - -impl Transactional for &Tree { - type View = TransactionalTree; - - fn make_overlay(&self) -> Result { - Ok(TransactionalTrees { - inner: vec![TransactionalTree::from_tree(self)], - }) - } - - fn view_overlay(overlay: &TransactionalTrees) -> Self::View { - overlay.inner[0].clone() - } -} - -impl Transactional for &&Tree { - type View = TransactionalTree; - - fn make_overlay(&self) -> Result { - Ok(TransactionalTrees { - inner: vec![TransactionalTree::from_tree(*self)], - }) - } - - fn view_overlay(overlay: &TransactionalTrees) -> Self::View { - overlay.inner[0].clone() - } -} +// +// impl Transactional for &Tree { +// type View = TransactionalTree; +// +// fn make_overlay(&self) -> Result { +// Ok(TransactionalTrees { +// inner: vec![TransactionalTree::from_tree(self)], +// }) +// } +// +// fn view_overlay(overlay: &TransactionalTrees) -> Self::View { +// overlay.inner[0].clone() +// } +// } +// +// impl Transactional for &&Tree { +// type View = TransactionalTree; +// +// fn make_overlay(&self) -> Result { +// Ok(TransactionalTrees { +// inner: vec![TransactionalTree::from_tree(*self)], +// }) +// } +// +// fn view_overlay(overlay: &TransactionalTrees) -> Self::View { +// overlay.inner[0].clone() +// } +// } impl Transactional for Tree { type View = TransactionalTree; diff --git a/src/tree.rs b/src/tree.rs index b1a540afa..6137921df 100644 --- a/src/tree.rs +++ b/src/tree.rs @@ -373,7 +373,7 @@ impl Tree { &transaction::TransactionalTree, ) -> transaction::ConflictableTransactionResult, { - Transactional::transaction(&self, f) + Transactional::transaction(self, f) } /// Create a new batched update that can be