From: Ian Jackson Date: Sun, 26 Jul 2020 23:27:51 +0000 (+0100) Subject: piece insert sort of works but js doesn't do the thing X-Git-Tag: otter-0.2.0~1232 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=ceec9b97971cc0f66a20b10051498b80fd4d6348;p=otter.git piece insert sort of works but js doesn't do the thing --- diff --git a/src/cmdlistener.rs b/src/cmdlistener.rs index 8a2167a4..948986e6 100644 --- a/src/cmdlistener.rs +++ b/src/cmdlistener.rs @@ -199,7 +199,7 @@ fn do_authorise_scope(cs: &CommandStream, wanted: &ManagementScope) #[throws(ME)] fn execute(cs: &mut CommandStream, cmd: MgmtCommand) -> MgmtResponse { -// use MgmtError::*; + eprintln!("{:?} executing {:?}", &cs.desc, &cmd); match cmd { Noop { } => Fine { }, @@ -266,7 +266,7 @@ fn execute(cs: &mut CommandStream, cmd: MgmtCommand) -> MgmtResponse { #[derive(Debug,Default)] struct UpdateHandlerBulk { - pieces : SecondarySlotMap>, + pieces : slotmap::SparseSecondaryMap>, } #[derive(Debug)] @@ -301,7 +301,7 @@ impl UpdateHandler { ( _ , _ ) => Some( Modify(()) ), }; match ne { - Some(ne) => { bulk.pieces[upiece] = ne; }, + Some(ne) => { bulk.pieces.insert(upiece, ne); }, None => { bulk.pieces.remove(upiece); }, }; }