summaryrefslogtreecommitdiff
path: root/src/repo
diff options
context:
space:
mode:
authorAdam T. Carpenter <atc@53hor.net>2021-04-09 20:26:19 -0400
committerAdam T. Carpenter <atc@53hor.net>2021-04-09 20:26:19 -0400
commit93d9a3b8d6984a8f113a30fea523607162e71589 (patch)
tree7856d0a2fd6701ff23a96321f740ccccb15a7f0f /src/repo
parent201a37e8d3d0ef4c59b184c0707ec8ddd301a25a (diff)
downloadtwinh-93d9a3b8d6984a8f113a30fea523607162e71589.tar.xz
twinh-93d9a3b8d6984a8f113a30fea523607162e71589.zip
better startup configuration
Diffstat (limited to 'src/repo')
-rw-r--r--src/repo/mod.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/repo/mod.rs b/src/repo/mod.rs
index f0bb95c..45e9ce3 100644
--- a/src/repo/mod.rs
+++ b/src/repo/mod.rs
@@ -11,7 +11,7 @@ mod constants;
static REPO_INSTANCE: Lazy<Db> = Lazy::new(|| {
Config::default()
- .path(&CONFIG_INSTANCE.db_uri)
+ .path(&CONFIG_INSTANCE.db_path)
.temporary(true)
.open()
.expect("Couldn't open DB!")
@@ -19,7 +19,7 @@ static REPO_INSTANCE: Lazy<Db> = Lazy::new(|| {
pub fn create_demo_db() -> Result<(), TwinHError> {
let db = sled::Config::default()
- .path(&CONFIG_INSTANCE.db_uri)
+ .path(&CONFIG_INSTANCE.db_path)
.create_new(true)
.open()?;
let cars_tree = db.open_tree(CARS_TREE)?;
@@ -28,7 +28,7 @@ pub fn create_demo_db() -> Result<(), TwinHError> {
pub fn create_new_db() -> Result<(), TwinHError> {
sled::Config::default()
- .path(&CONFIG_INSTANCE.db_uri)
+ .path(&CONFIG_INSTANCE.db_path)
.create_new(true)
.open()?;
Ok(())