From 4f7341d22da54a40491c294d0da4567439538958 Mon Sep 17 00:00:00 2001 From: hlafaille Date: Wed, 13 Mar 2024 12:40:03 -0400 Subject: [PATCH] #4 adjusting state lock file --- src/backend/context.rs | 2 +- src/backend/lock.rs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/backend/context.rs b/src/backend/context.rs index 55ef5ae..3b93071 100644 --- a/src/backend/context.rs +++ b/src/backend/context.rs @@ -80,7 +80,7 @@ pub fn get_absolute_paths(debug_mode: &bool) -> io::Result { source: cwd_string.clone() + "/src/java", config: cwd_string.clone() + "/espresso.toml", inner_workings: cwd_string.clone() + "/.espresso", - state_lockfile: cwd_string.clone() + "/.espresso/state.lock" + state_lockfile: cwd_string.clone() + "/.espresso/state.lock.toml" }) } diff --git a/src/backend/lock.rs b/src/backend/lock.rs index 28e5648..37ce15b 100644 --- a/src/backend/lock.rs +++ b/src/backend/lock.rs @@ -1,12 +1,12 @@ -use std::{error, fs, result}; +use std::{collections::{self, HashMap}, error, fs, hash, result}; use serde::{Deserialize, Serialize}; -use super::context::{AbsoltuePaths, DynamicAbsolutePaths}; +use super::context::AbsoltuePaths; #[derive(Serialize, Deserialize, Debug, Clone)] pub struct StateLockFile { - pub dependencies: Vec, + pub dependencies: collections::HashMap, } /** @@ -35,7 +35,7 @@ pub fn get_state_lockfile_from_fs(ap: &AbsoltuePaths) -> result::Result result::Result<(), Box> { let base = StateLockFile { - dependencies: vec![] + dependencies: HashMap::new() }; let toml_string = toml::to_string(&base)?;