chiark / gitweb /
Move DEFKEY_FLIP to where it ought to be used, and use it
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 26 Mar 2022 12:02:07 +0000 (12:02 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 26 Mar 2022 12:02:07 +0000 (12:02 +0000)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
daemon/api.rs
src/pcrender.rs

index c5020cf854c1d177b059de536803db0088a3eea8..77b5d1c8e129f7cfb0a5cad05bc31561beec9754 100644 (file)
@@ -576,8 +576,6 @@ api_route!{
   }
 }
 
-const DEFKEY_FLIP: UoKey = 'f';
-
 api_route!{
   api_uo, "/_/api/k",
   struct ApiPieceUo {
index 37a37283bd9c4524722996ad832e237e50a34e5b..3f7e5a737a1eea84e5c590c987c8daa69076c5dc 100644 (file)
@@ -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(),
       })