Skip to content

Commit

Permalink
Use consistent table typing in redb
Browse files Browse the repository at this point in the history
  • Loading branch information
kayabaNerve committed Nov 26, 2023
1 parent 7e163be commit 84a0c67
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions common/db/src/redb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ impl Get for WriteTransaction<'_> {
}
impl DbTxn for WriteTransaction<'_> {
fn put(&mut self, key: impl AsRef<[u8]>, value: impl AsRef<[u8]>) {
let mut table = self.open_table::<&[u8], &[u8]>(TableDefinition::new("default")).unwrap();
table.insert(key.as_ref(), value.as_ref()).unwrap();
let mut table = self.open_table::<&[u8], Vec<u8>>(TableDefinition::new("default")).unwrap();
table.insert(key.as_ref(), &value.as_ref().to_vec()).unwrap();
}
fn del(&mut self, key: impl AsRef<[u8]>) {
let mut table = self.open_table::<&[u8], Vec<u8>>(TableDefinition::new("default")).unwrap();
Expand Down

0 comments on commit 84a0c67

Please sign in to comment.