From 382143e6dac808ec5b1e2d79d00acbd92a085311 Mon Sep 17 00:00:00 2001 From: Nilstrieb <48135649+Nilstrieb@users.noreply.github.com> Date: Wed, 31 Jan 2024 21:44:40 +0100 Subject: [PATCH] db --- src/db.rs | 3 +-- src/workspace.rs | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/db.rs b/src/db.rs index 95c56b7..467c7bd 100644 --- a/src/db.rs +++ b/src/db.rs @@ -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
{ diff --git a/src/workspace.rs b/src/workspace.rs index 2e9a99e..eeeae45 100644 --- a/src/workspace.rs +++ b/src/workspace.rs @@ -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 }) } }