Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
suo committed May 10, 2022
1 parent b701a8b commit 144ab23
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/persistent_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,8 @@ impl PersistentDataStore {

run_dirs.sort_unstable();
run_dirs.reverse();

debug!("Found past runs: {:?}", run_dirs);
Ok(run_dirs)
}

Expand All @@ -180,8 +182,11 @@ impl PersistentDataStore {
let dir = run_dirs.get(invocation);
match dir {
Some(dir) => {
debug!("Reading run info from {}", dir.display());
let run_info = std::fs::read_to_string(dir.join("run_info.json"))
.context("couldn't read run info json")?;
let run_info: RunInfo =
serde_json::from_str(&std::fs::read_to_string(dir.join("run_info.json"))?)?;
serde_json::from_str(&run_info).context("couldn't deserialize run info")?;
Ok(run_info)
}
None => {
Expand Down

0 comments on commit 144ab23

Please sign in to comment.