diff options
author | Justin Worthe <justin@worthe-it.co.za> | 2019-04-25 16:50:06 +0200 |
---|---|---|
committer | Justin Worthe <justin@worthe-it.co.za> | 2019-04-25 16:50:06 +0200 |
commit | 510767263a0060ad13b2488a9402b1d176ad65ef (patch) | |
tree | 8f5d1dc7bb290c01c54f30b4ebe2868d8ac80272 /src/json.rs | |
parent | 5c957c0c8e928cbe64eb8a84733d649fd32642ef (diff) |
Test that match replay matches my simulation
Diffstat (limited to 'src/json.rs')
-rw-r--r-- | src/json.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/json.rs b/src/json.rs index 5a8267f..979252e 100644 --- a/src/json.rs +++ b/src/json.rs @@ -1,11 +1,12 @@ use std::error::Error; use std::fs::File; use std::io::prelude::*; +use std::path::Path; use serde::{Deserialize, Serialize}; use serde_json; -pub fn read_state_from_json_file(filename: &str) -> Result<State, Box<Error>> { +pub fn read_state_from_json_file(filename: &Path) -> Result<State, Box<Error>> { let mut file = File::open(filename)?; let mut content = String::new(); file.read_to_string(&mut content)?; |