From 073129f5e95f86e831d989f882392adcfe708bba Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Mon, 22 Mar 2021 00:03:15 +0000 Subject: [PATCH] Sprinkle some 'static + Send + Debug Signed-off-by: Ian Jackson --- src/gamestate.rs | 6 +++--- src/shapelib.rs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gamestate.rs b/src/gamestate.rs index fc2a98a7..42545976 100644 --- a/src/gamestate.rs +++ b/src/gamestate.rs @@ -99,7 +99,7 @@ impl_downcast!(PieceXData); #[enum_dispatch] #[dyn_upcast] -pub trait OutlineTrait: Send + Debug { +pub trait OutlineTrait: Debug + Send + 'static { fn outline_path(&self, scale: f64) -> Result; fn surround_path(&self) -> Result { self.outline_path(SELECT_SCALE) @@ -169,7 +169,7 @@ pub trait PieceTrait: OutlineTrait + Send + Debug + 'static { } #[typetag::serde] -pub trait OccultedPieceTrait: OutlineTrait + 'static { +pub trait OccultedPieceTrait: OutlineTrait { fn svg(&self, f: &mut Html, id: VisiblePieceId) -> Result<(),IE>; fn describe_html(&self) -> Result; } @@ -193,7 +193,7 @@ pub struct PieceSpecLoaded { } #[typetag::serde(tag="type")] -pub trait PieceSpec: Debug { +pub trait PieceSpec: Debug + Send + 'static { fn count(&self) -> usize { 1 } fn load(&self, i: usize, gpc: &mut GPiece, ir: &InstanceRef) -> Result; diff --git a/src/shapelib.rs b/src/shapelib.rs index dff25205..9d51b585 100644 --- a/src/shapelib.rs +++ b/src/shapelib.rs @@ -24,7 +24,7 @@ pub struct GroupData { } #[typetag::deserialize(tag="outline")] -pub trait OutlineDefn: Debug + Sync + Send { +pub trait OutlineDefn: Debug + Sync + Send + 'static { fn check(&self, lgi: &GroupData) -> Result<(),LLE>; fn load(&self, lgi: &GroupData) -> Result; } -- 2.30.2