Skip to content

Move PointExt::new to Point #153

@stepancheg

Description

@stepancheg

JetBrains IDE is trying it's best to complete code, and unfortunately completes ::new for every object, because there's

impl<T> PointExt for T where T: Point {}

pub trait PointExt: Point {
    fn new() -> Self {
        Self::from_value(Zero::zero())
    }

even for types which actually don't implement Point.

We live in imperfect world, and it would be easier if rstar moved ::new to Point from PointExt. Or just hid it from public API. Perhaps #[doc(hidden)].

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions