From 0f3bd4420e38c48900ccb5783993f5edc5a71bd7 Mon Sep 17 00:00:00 2001 From: Quaternions Date: Tue, 13 Feb 2024 05:38:35 -0800 Subject: [PATCH] use unreachable instead of panic --- src/rbx.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/rbx.rs b/src/rbx.rs index ec8c051..510db03 100644 --- a/src/rbx.rs +++ b/src/rbx.rs @@ -534,7 +534,7 @@ pub fn convertOption>(dom:rbx_dom_weak::WeakDo 3=>(size.z,size.y),//left 4=>(size.x,size.z),//bottom 5=>(size.x,size.y),//front - _=>panic!("unreachable"), + _=>unreachable!(), }; ( glam::vec4(decal_color3.r,decal_color3.g,decal_color3.b,1.0-*decal_transparency), @@ -612,7 +612,7 @@ pub fn convertOption>(dom:rbx_dom_weak::WeakDo 3=>primitives::CubeFace::Left, 4=>primitives::CubeFace::Bottom, 5=>primitives::CubeFace::Front, - _=>panic!("unreachable"), + _=>unreachable!(), }, match roblox_face_description{ Some(roblox_texture_transform)=>roblox_texture_transform.to_face_description(), @@ -631,7 +631,7 @@ pub fn convertOption>(dom:rbx_dom_weak::WeakDo 2=>primitives::WedgeFace::Back, 3=>primitives::WedgeFace::Left, 4=>primitives::WedgeFace::Bottom, - _=>panic!("unreachable"), + _=>unreachable!(), }, match roblox_face_description{ Some(roblox_texture_transform)=>roblox_texture_transform.to_face_description(), @@ -650,7 +650,7 @@ pub fn convertOption>(dom:rbx_dom_weak::WeakDo 2=>primitives::CornerWedgeFace::TopLeft, 3=>primitives::CornerWedgeFace::Bottom, 4=>primitives::CornerWedgeFace::Front, - _=>panic!("unreachable"), + _=>unreachable!(), }, match roblox_face_description{ Some(roblox_texture_transform)=>roblox_texture_transform.to_face_description(),