From ab2f2e4d8093f195b18b0dc60773959231df3d9c Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 1 May 2022 21:13:04 +0100 Subject: [PATCH] apitest: updates: handle Delete We blank out the info in the slot. That's probably the best we can do with the current data model. Signed-off-by: Ian Jackson --- apitest/atmain.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apitest/atmain.rs b/apitest/atmain.rs index 2f7bebca..69b727a7 100644 --- a/apitest/atmain.rs +++ b/apitest/atmain.rs @@ -444,6 +444,10 @@ pub fn update_update_pieces( let (op, d) = v["op"].as_object().unwrap().iter().next().unwrap(); match op.as_str() { + "Delete" => { + let p = p.unwrap(); + p.info = default(); + }, "Insert" | "InsertQuiet" => { assert!(p.is_none()); let piece = v["piece"].as_str().unwrap(); -- 2.30.2