Skip to content

Commit

Permalink
cargo fmt docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Veykril committed Apr 16, 2019
1 parent 34fe5ff commit b7436dd
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 _) }
}

Expand Down
4 changes: 2 additions & 2 deletions src/geometry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
5 changes: 3 additions & 2 deletions src/variant.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b7436dd

Please sign in to comment.