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:
9d49826
)
updates: Use idmap.fwd
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sun, 28 Feb 2021 17:04:07 +0000
(17:04 +0000)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sun, 28 Feb 2021 19:57:56 +0000
(19:57 +0000)
If there is no fwd id then don't send an update. Bit odd, but whatever.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
src/updates.rs
patch
|
blob
|
history
diff --git
a/src/updates.rs
b/src/updates.rs
index 20a9e54a66e0b64863131541865ec1ee78b695de..b6aa823e96951e10715f5b852b23ac7bc4d4ef42 100644
(file)
--- a/
src/updates.rs
+++ b/
src/updates.rs
@@
-552,11
+552,13
@@
impl<'r> PrepareUpdatesBuffer<'r> {
&mut gs.max_z, gpc, p, ops, &pri
)?
}
- _ => Some(PreparedPieceUpdate {
- // The piece is deleted, so we can't leak anything.
- piece: gpl.idmap.fwd_or_insert(piece),
- op: PieceUpdateOp::Delete(),
- })
+ _ => gpl.idmap.fwd(piece).map(
+ |vpid| PreparedPieceUpdate {
+ // The piece is deleted, so we can't leak anything.
+ piece: vpid,
+ op: PieceUpdateOp::Delete(),
+ }
+ )
};
if let Some(op) = op {