From b3ae51da8274693b75622349b4bba46efcaa8c3f Mon Sep 17 00:00:00 2001 From: Niko PLP Date: Wed, 10 Apr 2024 16:56:12 +0300 Subject: [PATCH] removed key in new() --- lib/oxigraph/src/storage/backend/oxi_rocksdb.rs | 7 ++----- lib/oxigraph/src/storage/mod.rs | 4 ++-- lib/oxigraph/src/store.rs | 8 +------- 3 files changed, 5 insertions(+), 14 deletions(-) diff --git a/lib/oxigraph/src/storage/backend/oxi_rocksdb.rs b/lib/oxigraph/src/storage/backend/oxi_rocksdb.rs index a90f1b41..aebc61a8 100644 --- a/lib/oxigraph/src/storage/backend/oxi_rocksdb.rs +++ b/lib/oxigraph/src/storage/backend/oxi_rocksdb.rs @@ -155,11 +155,8 @@ impl Drop for RoDbHandler { } impl Db { - pub fn new( - column_families: Vec, - key: Option<[u8; 32]>, - ) -> Result { - Self::open_read_write(None, column_families, key) + pub fn new(column_families: Vec) -> Result { + Self::open_read_write(None, column_families, None) } pub fn open_read_write( diff --git a/lib/oxigraph/src/storage/mod.rs b/lib/oxigraph/src/storage/mod.rs index fb1e3ba2..8dc332e4 100644 --- a/lib/oxigraph/src/storage/mod.rs +++ b/lib/oxigraph/src/storage/mod.rs @@ -72,8 +72,8 @@ pub struct Storage { } impl Storage { - pub fn new(key: Option<[u8; 32]>) -> Result { - Self::setup(Db::new(Self::column_families(), key)?) + pub fn new() -> Result { + Self::setup(Db::new(Self::column_families())?) } #[cfg(all(not(target_family = "wasm")))] diff --git a/lib/oxigraph/src/store.rs b/lib/oxigraph/src/store.rs index 70ed4a03..dc2447b3 100644 --- a/lib/oxigraph/src/store.rs +++ b/lib/oxigraph/src/store.rs @@ -91,13 +91,7 @@ impl Store { /// Creates a temporary [`Store`] that will be deleted after drop. pub fn new() -> Result { Ok(Self { - storage: Storage::new(None)?, - }) - } - - pub fn new_with_key(key: [u8; 32]) -> Result { - Ok(Self { - storage: Storage::new(Some(key))?, + storage: Storage::new()?, }) }