mirror of
https://github.com/Noratrieb/fix-und-fertig.git
synced 2026-01-14 10:45:05 +01:00
db
This commit is contained in:
parent
49c9e3aa4c
commit
382143e6da
2 changed files with 3 additions and 4 deletions
|
|
@ -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> {
|
||||
|
|
|
|||
|
|
@ -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 })
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue