diff --git a/src/context.rs b/src/context.rs index ccb6842..d3e2c29 100644 --- a/src/context.rs +++ b/src/context.rs @@ -444,7 +444,8 @@ impl Context { #[inline] pub fn stroke_options(&self) -> &StrokeOptions { - //FIXME? Make a Ref/RefMut wrapper struct that doesnt call the destructor, instead of doing this nasty ref casting + //FIXME? Make a Ref/RefMut wrapper struct that doesnt call the destructor, + // instead of doing this nasty ref casting unsafe { &*(&self.state().strokeOptions as *const _ as *const _) } } diff --git a/src/geometry.rs b/src/geometry.rs index 164101f..95cea2b 100644 --- a/src/geometry.rs +++ b/src/geometry.rs @@ -36,8 +36,8 @@ impl Geometry for crate::region::Region { const GEO_TYPE: u32 = GeometryType::Region as u32; } -// TODO: Should [Point] really implement Geometry? Given that it could be either a Polygon or a -// Polyline it might be better to make it explicit. +// TODO: Should [Point] really implement Geometry? Given that it could be either +// a Polygon or a Polyline it might be better to make it explicit. impl Geometry for [PointI] { const GEO_TYPE: u32 = GeometryType::PolygonI as u32; } diff --git a/src/variant.rs b/src/variant.rs index 475ffb2..7bbdcde 100644 --- a/src/variant.rs +++ b/src/variant.rs @@ -209,8 +209,9 @@ unsafe impl BlVariantCore for ffi::BLVariantCore { type Impl = ffi::BLVariantImpl; } -/// Implementing type must be #[repr(transparent)] and its only field may be a struct that contains -/// a pointer to a BlxxxxImpl, otherwise the [`core`] and [`core_mut`] methods have to be implemented manually +/// Implementing type must be #[repr(transparent)] and its only field may be a +/// struct that contains a pointer to a BlxxxxImpl, otherwise the [`core`] and +/// [`core_mut`] methods have to be implemented manually pub unsafe trait WrappedBlCore: Sized { type Core: BlVariantCore; const IMPL_TYPE_INDEX: usize;