diff --git a/crates/mind-body/src/projection/interpret/tests.rs b/crates/mind-body/src/projection/interpret/tests.rs index 41767dc..8c6ecc2 100644 --- a/crates/mind-body/src/projection/interpret/tests.rs +++ b/crates/mind-body/src/projection/interpret/tests.rs @@ -69,7 +69,7 @@ pub(crate) fn judged(mut answer: Value, packet: &Packet) -> Value { } let handles: Vec = packet.holds.iter().map(|hold| hold.id.clone()).chain(opened).collect(); for key in ["say", "amend"] { - for line in answer[key].as_array_mut().into_iter().flatten().filter(|line| line.get("clear_of").is_none()) { + for line in answer.get_mut(key).and_then(Value::as_array_mut).into_iter().flatten().filter(|line| line.get("clear_of").is_none()) { let named: Vec = line["holds"].as_array().into_iter().flatten().filter_map(Value::as_str).map(str::to_owned).collect(); line["clear_of"] = json!(handles.iter().filter(|handle| !named.contains(handle)).collect::>()); }