From: Ian Jackson Date: Sat, 26 Mar 2022 12:02:07 +0000 (+0000) Subject: Move DEFKEY_FLIP to where it ought to be used, and use it X-Git-Tag: otter-1.0.0~135 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=99c6e8358d795f1aeebf2021cccfc51b0d972963;p=otter.git Move DEFKEY_FLIP to where it ought to be used, and use it Signed-off-by: Ian Jackson --- diff --git a/daemon/api.rs b/daemon/api.rs index c5020cf8..77b5d1c8 100644 --- a/daemon/api.rs +++ b/daemon/api.rs @@ -576,8 +576,6 @@ api_route!{ } } -const DEFKEY_FLIP: UoKey = 'f'; - api_route!{ api_uo, "/_/api/k", struct ApiPieceUo { diff --git a/src/pcrender.rs b/src/pcrender.rs index 37a37283..3f7e5a73 100644 --- a/src/pcrender.rs +++ b/src/pcrender.rs @@ -11,6 +11,8 @@ pub type VisiblePieceAngle = PieceAngle; #[serde(transparent)] pub struct VisibleAngleTransform(Html); +const DEFKEY_FLIP: UoKey = 'f'; + #[derive(Debug,Clone)] pub struct PieceRenderInstructions { pub vpid: VisiblePieceId, @@ -236,7 +238,7 @@ impl PieceRenderInstructions { out.push(UoDescription { wrc: WRC::UpdateSvg, kind: UoKind::Global, - def_key: 'f'.into(), + def_key: DEFKEY_FLIP.into(), opname: "flip".to_string(), desc: Html::lit("flip").into(), })