From 6fa8fb39038bbbff25d835a7d125359b7cdfa7dc Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Mon, 22 Mar 2021 01:25:23 +0000 Subject: [PATCH] shapelib refactoring: Pass vpid to svg_face We're going to need this when this starts to be able to call other implementors of OccultedPieceTrait. Signed-off-by: Ian Jackson --- src/shapelib.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/shapelib.rs b/src/shapelib.rs index ca1a1ac3..db49a61f 100644 --- a/src/shapelib.rs +++ b/src/shapelib.rs @@ -240,7 +240,7 @@ impl FaceTransform { impl Item { #[throws(IE)] - fn svg_face(&self, f: &mut Html, face: FaceId) { + fn svg_face(&self, f: &mut Html, face: FaceId, _vpid: VisiblePieceId) { let face = &self.faces[face]; let svgd = &self.svgs[face.svg]; face.xform.write_svgd(f, svgd)?; @@ -260,8 +260,8 @@ impl PieceTrait for Item { #[throws(IE)] fn svg_piece(&self, f: &mut Html, gpc: &GPiece, - _gs: &GameState, _vpid: VisiblePieceId) { - self.svg_face(f, gpc.face)?; + _gs: &GameState, vpid: VisiblePieceId) { + self.svg_face(f, gpc.face, vpid)?; } #[throws(IE)] fn describe_html(&self, gpc: &GPiece) -> Html { @@ -274,8 +274,8 @@ impl PieceTrait for Item { #[typetag::serde(name="LibItem")] impl OccultedPieceTrait for Item { #[throws(IE)] - fn svg(&self, f: &mut Html, _id: VisiblePieceId) { - self.svg_face(f, default())?; + fn svg(&self, f: &mut Html, id: VisiblePieceId) { + self.svg_face(f, default(), id)?; } #[throws(IE)] fn describe_html(&self) -> Html { -- 2.30.2