From 0543cb345320a15280a5af7db941bb9fbffb4cd6 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Tue, 7 Jun 2022 17:50:10 +0200 Subject: Cleaner error management (less error-prone api) --- src/model/s3/block_ref_table.rs | 2 +- src/model/s3/object_table.rs | 2 +- src/model/s3/version_table.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/model/s3') diff --git a/src/model/s3/block_ref_table.rs b/src/model/s3/block_ref_table.rs index 2c06bc96..1134922e 100644 --- a/src/model/s3/block_ref_table.rs +++ b/src/model/s3/block_ref_table.rs @@ -58,7 +58,7 @@ impl TableSchema for BlockRefTable { tx: &mut db::Transaction, old: Option<&Self::E>, new: Option<&Self::E>, - ) -> db::Result<()> { + ) -> db::TxOpResult<()> { #[allow(clippy::or_fun_call)] let block = old.or(new).unwrap().block; let was_before = old.map(|x| !x.deleted.get()).unwrap_or(false); diff --git a/src/model/s3/object_table.rs b/src/model/s3/object_table.rs index f3bd9892..62f5d8d9 100644 --- a/src/model/s3/object_table.rs +++ b/src/model/s3/object_table.rs @@ -239,7 +239,7 @@ impl TableSchema for ObjectTable { _tx: &mut db::Transaction, old: Option<&Self::E>, new: Option<&Self::E>, - ) -> db::Result<()> { + ) -> db::TxOpResult<()> { let version_table = self.version_table.clone(); let old = old.cloned(); let new = new.cloned(); diff --git a/src/model/s3/version_table.rs b/src/model/s3/version_table.rs index d168c2c2..881c245a 100644 --- a/src/model/s3/version_table.rs +++ b/src/model/s3/version_table.rs @@ -144,7 +144,7 @@ impl TableSchema for VersionTable { _tx: &mut db::Transaction, old: Option<&Self::E>, new: Option<&Self::E>, - ) -> db::Result<()> { + ) -> db::TxOpResult<()> { let block_ref_table = self.block_ref_table.clone(); let old = old.cloned(); let new = new.cloned(); -- cgit v1.2.3