From: Ian Jackson Date: Fri, 15 Apr 2022 11:28:57 +0000 (+0100) Subject: Special client rendering: Do explain why not to provide xdata here X-Git-Tag: otter-1.1.0~579 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=8bc973dcb907fb745bf9c3535db434b53330be40;p=otter.git Special client rendering: Do explain why not to provide xdata here Signed-off-by: Ian Jackson --- diff --git a/src/gamestate.rs b/src/gamestate.rs index e649864b..c35b0f7b 100644 --- a/src/gamestate.rs +++ b/src/gamestate.rs @@ -180,6 +180,10 @@ pub trait PieceBaseTrait: OutlineTrait + Send + Debug + 'static { fn itemname(&self) -> &str; + // Don't add an xdata argument to this. Implementors must not make + // this depend on the piece state, because the piece state might change + // between svg() (which sets up information in the DOM) and special() + // (which arranges to use that information). fn special(&self) -> Result,IE> { Ok(None) } }