chiark / gitweb /
shapelib: Rename OutlineDefnTrait
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 12 May 2022 00:51:22 +0000 (01:51 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 12 May 2022 01:04:48 +0000 (02:04 +0100)
This is clearer as we have the Enum too.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
src/shapelib.rs

index ed46e30f19b4132b8f84e26ba3ddb182820c1d6f..349e7cbf22dc72414a7edb3820c2382142ed7970 100644 (file)
@@ -733,7 +733,7 @@ impl GroupDetails {
 //---------- OutlineDefn etc. ----------
 
 #[ambassador::delegatable_trait]
-pub trait OutlineDefn: Debug + Sync + Send + 'static {
+pub trait OutlineDefnTrait: Debug + Sync + Send + 'static {
   /// Success or failure must not depend on `svg_sz`
   ///
   /// Called to *check* the group configuration before load, but
@@ -760,7 +760,7 @@ macro_rules! outline_defns {
     }
 
     impl OutlineDefnEnum {
-      fn defn(self) -> &'static dyn OutlineDefn {
+      fn defn(self) -> &'static dyn OutlineDefnTrait {
         match self { $(
           Self::$Shape => &[< $Shape Defn >] as _,
         )* }
@@ -772,7 +772,7 @@ macro_rules! outline_defns {
 
 outline_defns! { Circle, Rect }
 impl_via_ambassador!{
-  impl OutlineDefn for OutlineDefnEnum { defn() }
+  impl OutlineDefnTrait for OutlineDefnEnum { defn() }
 }
 
 //---------- RectShape ----------
@@ -829,7 +829,7 @@ impl OutlineTrait for RectShape {
 
 #[derive(Deserialize,Debug)]
 struct RectDefn;
-impl OutlineDefn for RectDefn {
+impl OutlineDefnTrait for RectDefn {
   fn load(&self, size: PosC<f64>) -> Outline {
     RectShape { xy: size }.into()
   }
@@ -866,7 +866,7 @@ impl OutlineTrait for CircleShape {
 
 #[derive(Deserialize,Debug)]
 struct CircleDefn;
-impl OutlineDefn for CircleDefn {
+impl OutlineDefnTrait for CircleDefn {
   fn load(&self, size: PosC<f64>) -> Outline {
     let diam = size
       .coords.into_iter()