chiark
/
gitweb
/
~ianmdlvl
/
otter.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8152543
)
apitest: updates: handle Delete
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sun, 1 May 2022 20:13:04 +0000
(21:13 +0100)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sun, 1 May 2022 20:13:04 +0000
(21:13 +0100)
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 <ijackson@chiark.greenend.org.uk>
apitest/atmain.rs
patch
|
blob
|
history
diff --git
a/apitest/atmain.rs
b/apitest/atmain.rs
index 2f7bebcaa8f8e4ff72bbbb347bb41bad84c1283a..69b727a7ef4279721f08a31e06d8f4aa926313c9 100644
(file)
--- a/
apitest/atmain.rs
+++ b/
apitest/atmain.rs
@@
-444,6
+444,10
@@
pub fn update_update_pieces<PI:Idx>(
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();