aboutsummaryrefslogtreecommitdiff
path: root/src/model/s3
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2022-06-07 17:50:10 +0200
committerAlex Auvolat <alex@adnab.me>2022-06-07 17:50:10 +0200
commit0543cb345320a15280a5af7db941bb9fbffb4cd6 (patch)
treeff5b054bc30b3ca826d5e1eece05198ae3c16f57 /src/model/s3
parent1bbe0794f363eb59c56548cca672013fd78f361a (diff)
downloadgarage-0543cb345320a15280a5af7db941bb9fbffb4cd6.tar.gz
garage-0543cb345320a15280a5af7db941bb9fbffb4cd6.zip
Cleaner error management (less error-prone api)
Diffstat (limited to 'src/model/s3')
-rw-r--r--src/model/s3/block_ref_table.rs2
-rw-r--r--src/model/s3/object_table.rs2
-rw-r--r--src/model/s3/version_table.rs2
3 files changed, 3 insertions, 3 deletions
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();