diff options
author | Alex Auvolat <alex@adnab.me> | 2022-06-07 18:06:30 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2022-06-07 18:06:30 +0200 |
commit | d41a67c4eea3dbb1e40e5eb0fcee28dd916c8f29 (patch) | |
tree | 62f0cc66c505f1db589600a6ea4e6792a2b4a61b /src/db/lmdb_adapter.rs | |
parent | daec7995c33e9d8213dec1f6256855737a83fd0c (diff) | |
download | garage-d41a67c4eea3dbb1e40e5eb0fcee28dd916c8f29.tar.gz garage-d41a67c4eea3dbb1e40e5eb0fcee28dd916c8f29.zip |
simplify & fix db tests
Diffstat (limited to 'src/db/lmdb_adapter.rs')
-rw-r--r-- | src/db/lmdb_adapter.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/db/lmdb_adapter.rs b/src/db/lmdb_adapter.rs index b82add75..23b8c87e 100644 --- a/src/db/lmdb_adapter.rs +++ b/src/db/lmdb_adapter.rs @@ -203,12 +203,12 @@ impl IDb for LmdbDb { // ---- -struct LmdbTx<'a, 'db> { - trees: &'db [Database], +struct LmdbTx<'a> { + trees: &'a [Database], tx: RwTxn<'a, 'a>, } -impl<'a, 'db> LmdbTx<'a, 'db> { +impl<'a> LmdbTx<'a> { fn get_tree(&self, i: usize) -> TxOpResult<&Database> { self.trees.get(i).ok_or_else(|| { TxOpError(Error( @@ -218,7 +218,7 @@ impl<'a, 'db> LmdbTx<'a, 'db> { } } -impl<'a, 'db> ITx for LmdbTx<'a, 'db> { +impl<'a> ITx for LmdbTx<'a> { fn get(&self, tree: usize, key: &[u8]) -> TxOpResult<Option<Value>> { let tree = self.get_tree(tree)?; match tree.get(&self.tx, key)? { |