Skip to content

Commit

Permalink
#4 adjusting state lock file
Browse files Browse the repository at this point in the history
  • Loading branch information
hlafaille committed Mar 13, 2024
1 parent 4a79cdc commit 4f7341d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/backend/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ pub fn get_absolute_paths(debug_mode: &bool) -> io::Result<AbsoltuePaths> {
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"
})
}

Expand Down
8 changes: 4 additions & 4 deletions src/backend/lock.rs
Original file line number Diff line number Diff line change
@@ -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<Dependency>,
pub dependencies: collections::HashMap<String, Dependency>,
}

/**
Expand Down Expand Up @@ -35,7 +35,7 @@ pub fn get_state_lockfile_from_fs(ap: &AbsoltuePaths) -> result::Result<StateLoc
/// Initialize a new state lockfile
pub fn initialize_state_lockfile(ap: &AbsoltuePaths) -> result::Result<(), Box<dyn error::Error>> {
let base = StateLockFile {
dependencies: vec![]
dependencies: HashMap::new()
};

let toml_string = toml::to_string(&base)?;
Expand Down

0 comments on commit 4f7341d

Please sign in to comment.