From: Ian Jackson Date: Sun, 1 May 2022 20:13:04 +0000 (+0100) Subject: apitest: updates: handle Delete X-Git-Tag: otter-1.1.0~325 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=ab2f2e4d8093f195b18b0dc60773959231df3d9c;p=otter.git 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 --- 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();