This commit is contained in:
Hanno Braun 2024-12-13 19:47:17 +01:00
parent 796fc796b7
commit 464fcdf664

View File

@ -44,14 +44,9 @@ pub struct Triangle {
pub vertices: [Vertex; 3],
}
impl<V> From<[V; 3]> for Triangle
where
V: Into<Vertex>,
{
fn from(vertices: [V; 3]) -> Self {
Self {
vertices: vertices.map(Into::into),
}
impl From<[Vertex; 3]> for Triangle {
fn from(vertices: [Vertex; 3]) -> Self {
Self { vertices }
}
}