From: Ian Jackson Date: Thu, 12 May 2022 00:51:22 +0000 (+0100) Subject: shapelib: Rename OutlineDefnTrait X-Git-Tag: otter-1.1.0~220 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=03c718d188e7727ae4558b708086e3fcc330509c;p=otter.git shapelib: Rename OutlineDefnTrait This is clearer as we have the Enum too. Signed-off-by: Ian Jackson --- diff --git a/src/shapelib.rs b/src/shapelib.rs index ed46e30f..349e7cbf 100644 --- a/src/shapelib.rs +++ b/src/shapelib.rs @@ -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) -> 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) -> Outline { let diam = size .coords.into_iter()