Skip to content

Commit

Permalink
Correct stray Redb
Browse files Browse the repository at this point in the history
  • Loading branch information
kayabaNerve committed Nov 30, 2023
1 parent ca17342 commit 76fa83c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions common/db/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ mod rocks;
#[cfg(feature = "rocksdb")]
pub use rocks::{RocksDB, new_rocksdb};

#[cfg(feature = "parity_db")]
#[cfg(feature = "parity-db")]
mod parity_db;
#[cfg(feature = "parity_db")]
#[cfg(feature = "parity-db")]
pub use parity_db::{ParityDb, new_parity_db};

/// An object implementing get.
Expand Down
5 changes: 2 additions & 3 deletions common/db/src/parity_db.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use std::sync::Arc;

pub use ::parity_db::Db as ParityDb;
use ::redb::*;
pub use ::parity_db::{Options, Db as ParityDb};

use crate::*;

Expand Down Expand Up @@ -37,5 +36,5 @@ impl Db for Arc<ParityDb> {
}

pub fn new_parity_db(path: &str) -> Arc<ParityDb> {
Arc::new(ParityDb::open_or_crate(Options::with_columns(path, 1)).unwrap())
Arc::new(ParityDb::open_or_create(&Options::with_columns(std::path::Path::new(path), 1)).unwrap())
}
2 changes: 1 addition & 1 deletion message-queue/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ pub(crate) use crate::messages::*;
pub(crate) use crate::queue::Queue;

#[cfg(all(feature = "parity-db", not(feature = "rocksdb")))]
pub(crate) type Db = Arc<serai_db::Redb>;
pub(crate) type Db = Arc<serai_db::ParityDb>;
#[cfg(feature = "rocksdb")]
pub(crate) type Db = serai_db::RocksDB;

Expand Down

0 comments on commit 76fa83c

Please sign in to comment.