mirror of
https://github.com/hannobraun/Fornjot
synced 2025-02-15 03:35:52 +00:00
Simplify
This commit is contained in:
parent
796fc796b7
commit
464fcdf664
@ -44,14 +44,9 @@ pub struct Triangle {
|
|||||||
pub vertices: [Vertex; 3],
|
pub vertices: [Vertex; 3],
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<V> From<[V; 3]> for Triangle
|
impl From<[Vertex; 3]> for Triangle {
|
||||||
where
|
fn from(vertices: [Vertex; 3]) -> Self {
|
||||||
V: Into<Vertex>,
|
Self { vertices }
|
||||||
{
|
|
||||||
fn from(vertices: [V; 3]) -> Self {
|
|
||||||
Self {
|
|
||||||
vertices: vertices.map(Into::into),
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user