diff --git a/src/geometry.rs b/src/geometry.rs index 7bed94e..d0502fe 100644 --- a/src/geometry.rs +++ b/src/geometry.rs @@ -1,6 +1,6 @@ //! Types for defining and using geometries. -use lyon_algorithms::path::{builder::WithSvg, BuilderImpl}; +use lyon_algorithms::path::{builder::WithSvg, traits::Build, BuilderImpl}; use lyon_tessellation::path::path::Builder; use crate::{ @@ -144,21 +144,12 @@ impl ShapeBuilderBase for ReadyShapeBuilder Shape; -} - -impl ReadyShapeBuilderTrait for ReadyShapeBuilder { - fn build(self) -> Shape { - Shape::new(self.builder.build(), self.fill, self.stroke) - } -} - -impl ReadyShapeBuilderTrait for ReadyShapeBuilder> { - fn build(self) -> Shape { +impl ReadyShapeBuilder +where + GenericBuilder: Build, +{ + /// Builds the path according to builder settings. + pub fn build(self) -> Shape { Shape::new(self.builder.build(), self.fill, self.stroke) } } diff --git a/src/lib.rs b/src/lib.rs index de8e9bc..76d2786 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -43,7 +43,7 @@ pub mod prelude { pub use crate::{ draw::{Fill, Stroke}, entity::Shape, - geometry::{Geometry, ReadyShapeBuilderTrait, ShapeBuilder, ShapeBuilderBase}, + geometry::{Geometry, ShapeBuilder, ShapeBuilderBase}, path::ShapePath, plugin::ShapePlugin, shapes::{self, BorderRadii, RectangleOrigin, RegularPolygon, RegularPolygonFeature},