implement Error trait

This commit is contained in:
Quaternions 2024-03-12 20:40:02 -07:00
parent 1b196dc831
commit d50c15c187

View File

@ -3,10 +3,17 @@ use std::collections::HashMap;
use rbx_mesh::mesh::{Vertex2, Vertex2Truncated}; use rbx_mesh::mesh::{Vertex2, Vertex2Truncated};
use strafesnet_common::{integer::Planar64Vec3,model::{self,ColorId,IndexedVertex,NormalId,PolygonList,PositionId,TextureCoordinateId,VertexId}}; use strafesnet_common::{integer::Planar64Vec3,model::{self,ColorId,IndexedVertex,NormalId,PolygonList,PositionId,TextureCoordinateId,VertexId}};
#[derive(Debug)]
pub enum Error{ pub enum Error{
Planar64Vec3(strafesnet_common::integer::Planar64TryFromFloatError), Planar64Vec3(strafesnet_common::integer::Planar64TryFromFloatError),
RbxMesh(rbx_mesh::mesh::Error) RbxMesh(rbx_mesh::mesh::Error)
} }
impl std::fmt::Display for Error{
fn fmt(&self,f:&mut std::fmt::Formatter<'_>)->std::fmt::Result{
write!(f,"{self:?}")
}
}
impl std::error::Error for Error{}
fn ingest_vertices2< fn ingest_vertices2<
AcquirePosId, AcquirePosId,