mirror of https://github.com/hannobraun/Fornjot
Move `impl` blocks closer to related type
This commit is contained in:
parent
20181e4d4d
commit
57c627edea
|
@ -134,6 +134,18 @@ impl Sketch {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<Sketch> for Shape {
|
||||
fn from(shape: Sketch) -> Self {
|
||||
Self::Shape2d(shape.into())
|
||||
}
|
||||
}
|
||||
|
||||
impl From<Sketch> for Shape2d {
|
||||
fn from(shape: Sketch) -> Self {
|
||||
Shape2d::Sketch(shape)
|
||||
}
|
||||
}
|
||||
|
||||
/// A chain of elements that is part of a [`Sketch`]
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
|
||||
|
@ -187,15 +199,3 @@ impl PolyChain {
|
|||
self.points.clone().into()
|
||||
}
|
||||
}
|
||||
|
||||
impl From<Sketch> for Shape {
|
||||
fn from(shape: Sketch) -> Self {
|
||||
Self::Shape2d(shape.into())
|
||||
}
|
||||
}
|
||||
|
||||
impl From<Sketch> for Shape2d {
|
||||
fn from(shape: Sketch) -> Self {
|
||||
Shape2d::Sketch(shape)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue