mirror of
https://github.com/tursodatabase/limbo.git
synced 2025-08-04 18:18:03 +00:00
sim: when loading bug, dont panic if there are no runs
This commit is contained in:
parent
6c8aa4e043
commit
73db450b8b
1 changed files with 3 additions and 4 deletions
|
@ -279,12 +279,11 @@ impl BugBase {
|
|||
})?;
|
||||
let plan: InteractionPlan = serde_json::from_str(&plan)
|
||||
.with_context(|| "should be able to deserialize plan")?;
|
||||
|
||||
let runs =
|
||||
std::fs::read_to_string(self.path.join(seed.to_string()).join("runs.json"))
|
||||
.with_context(|| "should be able to read runs file")?;
|
||||
let runs: Vec<BugRun> = serde_json::from_str(&runs)
|
||||
.with_context(|| "should be able to deserialize runs")?;
|
||||
.with_context(|| "should be able to read runs file")
|
||||
.and_then(|runs| serde_json::from_str(&runs).map_err(|e| anyhow!("{}", e)))
|
||||
.unwrap_or_default();
|
||||
|
||||
let bug = LoadedBug {
|
||||
seed,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue