Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
brson committed Oct 13, 2020
1 parent be0d98f commit a350977
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions src/db_3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ use anyhow::{Result, Error};

mod fs_thread;
mod logcmd;
mod paths;

use fs_thread::FsThread;
use logcmd::LogCommand;
Expand Down Expand Up @@ -61,7 +62,7 @@ impl Db {
let mut stores = BTreeMap::new();

for tree in &config.trees {
let path = tree_path(&config.path, tree)?;
let path = paths::tree_path(&config.path, tree)?;
let store = Store::new(path, fs_thread.clone()).await?;
stores.insert(tree.clone(), store);
}
Expand All @@ -72,10 +73,6 @@ impl Db {
fs_thread,
next_batch_view: AtomicU64::new(0),
});

fn tree_path(dir: &Path, tree: &str) -> Result<PathBuf> {
panic!()
}
}
}

Expand Down Expand Up @@ -138,16 +135,12 @@ impl Db {
impl Store {
async fn new(path: PathBuf, fs_thread: Arc<FsThread>) -> Result<Store> {

let log_path = log_path(&path);
let log_path = paths::log_path(&path);
let log = Log::open(path, fs_thread).await?;

return Ok(Store {
log,
});

fn log_path(path: &Path) -> PathBuf {
panic!()
}
}
}

Expand Down

0 comments on commit a350977

Please sign in to comment.