From: Ian Jackson Date: Sun, 27 Sep 2020 23:27:42 +0000 (+0100) Subject: Abolish svg_x_defs X-Git-Tag: otter-0.2.0~823 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=21cbad3f84d7f9d0f737480b86a703c0e76b09bf;p=otter.git Abolish svg_x_defs This is useless, because basically all modifications have to send the whole thing again anyway. Maybe in the far far future we will (re)introduce something like it. Signed-off-by: Ian Jackson --- diff --git a/src/gamestate.rs b/src/gamestate.rs index e4ee9214..886fe0db 100644 --- a/src/gamestate.rs +++ b/src/gamestate.rs @@ -114,8 +114,6 @@ pub trait Piece : Outline + Send + Debug { // #[throws] doesn't work here for some reason fn svg_piece(&self, f: &mut Html, pri: &PieceRenderInstructions) -> IR; - fn svg_x_defs(&self, f: &mut Html, pri : &PieceRenderInstructions) -> IR; - fn describe_html(&self, face : Option) -> Html; fn delete_hook(&self, _p: &PieceState, _gs: &mut GameState) @@ -254,7 +252,6 @@ impl PieceExt for T where T: Piece + ?Sized { write!(&mut defs.0, r##""##, pri.id, self.surround_path(&pri)?.0)?; - self.svg_x_defs(&mut defs, &pri)?; defs } diff --git a/src/pieces.rs b/src/pieces.rs index 3c09b729..ec97620f 100644 --- a/src/pieces.rs +++ b/src/pieces.rs @@ -126,9 +126,6 @@ impl Piece for SimpleShape { self.colours[pri.face].0, &self.path.0)?; } - #[throws(IE)] - fn svg_x_defs(&self, _f: &mut Html, _pri : &PieceRenderInstructions) { - } fn describe_html(&self, face : Option) -> Html { Html(if let Some(face) = face { format!("a {} {}", self.colours[face].0, self.desc.0) diff --git a/src/shapelib.rs b/src/shapelib.rs index f6b63779..0daae466 100644 --- a/src/shapelib.rs +++ b/src/shapelib.rs @@ -171,9 +171,6 @@ impl Piece for Item { face.scale[0], face.scale[1], -face.centre[0], -face.centre[1], svgd.0)?; } - #[throws(IE)] - fn svg_x_defs(&self, _f: &mut Html, _pri : &PieceRenderInstructions) { - } fn describe_html(&self, face : Option) -> Html { self.descs[ match face { Some(face) => self.faces[face].desc,