chiark / gitweb /
Sprinkle some 'static + Send + Debug
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 22 Mar 2021 00:03:15 +0000 (00:03 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 22 Mar 2021 00:03:15 +0000 (00:03 +0000)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
src/gamestate.rs
src/shapelib.rs

index fc2a98a75d55f84ab387a7f8d8224f65b3b231f1..42545976d2de3375d5b13aff3539f5d3303e4f27 100644 (file)
@@ -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<Html, IE>;
   fn surround_path(&self) -> Result<Html, IE> {
     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<Html,IE>;
 }
@@ -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<PieceSpecLoaded, SpecError>;
index dff252057b63fd9443ee097a376627b48f7b406f..9d51b58523a214af69d616b1f27fb17d7a3f8e15 100644 (file)
@@ -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<Outline,IE>;
 }