From 99c6e8358d795f1aeebf2021cccfc51b0d972963 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 26 Mar 2022 12:02:07 +0000 Subject: [PATCH] Move DEFKEY_FLIP to where it ought to be used, and use it Signed-off-by: Ian Jackson --- daemon/api.rs | 2 -- src/pcrender.rs | 4 +++- 2 files changed, 3 insertions(+), 3 deletions(-) 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(), }) -- 2.30.2