This commit is contained in:
nora 2024-01-31 21:44:40 +01:00
parent 49c9e3aa4c
commit 382143e6da
2 changed files with 3 additions and 4 deletions

View file

@ -23,7 +23,6 @@ use color_eyre::{
};
pub struct Db {
db: Dir,
objects: Dir,
}
@ -49,7 +48,7 @@ impl Db {
.open_dir("objects")
.wrap_err("error opening .fuf/db/objects")?;
Ok(Self { db, objects })
Ok(Self { objects })
}
pub fn save_file(&self, content: &[u8]) -> Result<Address> {

View file

@ -11,7 +11,7 @@ use color_eyre::{
};
pub struct Workspace {
root: Dir,
_root: Dir,
pub db: Db,
}
@ -34,7 +34,7 @@ impl Workspace {
let dir = File::open(root).wrap_err("opening workspace directory")?;
let dir = Dir::from_std_file(dir);
let db = Db::open(&dir).wrap_err("opening .fuf database")?;
Ok(Self { root: dir, db })
Ok(Self { _root: dir, db })
}
}