This commit is contained in:
Bel LaPointe
2025-11-11 10:21:58 -07:00
parent e48338ff0e
commit 07e2750db5
2 changed files with 3 additions and 2 deletions

View File

@@ -105,7 +105,7 @@ impl File {
let snapshot = serde_json::to_string(&persisted).unwrap();
let snapshot: serde_json::Value = serde_json::from_str(snapshot.as_str()).unwrap();
let stage = self.snapshot()?;
let stage = self.stage()?;
let stage = serde_json::to_string(&stage).unwrap();
let stage: serde_json::Value = serde_json::from_str(stage.as_str()).unwrap();
@@ -121,7 +121,7 @@ impl File {
Ok(())
}
fn snapshot(&self) -> Result<Vec<Task>, String> {
fn stage(&self) -> Result<Vec<Task>, String> {
let mut r = match std::fs::File::open(self.file.clone()) {
Ok(f) => Ok(f),
Err(msg) => Err(format!("could not open {}: {}", &self.file, msg)),