From c616e82c470b32e6817265206173daa46d5c5192 Mon Sep 17 00:00:00 2001 From: Quaternions Date: Mon, 19 Aug 2024 17:01:49 -0700 Subject: [PATCH] use const --- src/model_physics.rs | 2 +- src/physics.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/model_physics.rs b/src/model_physics.rs index 7ca4256..566c507 100644 --- a/src/model_physics.rs +++ b/src/model_physics.rs @@ -462,7 +462,7 @@ pub struct TransformedMesh<'a>{ transform:&'a PhysicsMeshTransform, } impl TransformedMesh<'_>{ - pub fn new<'a>( + pub const fn new<'a>( view:PhysicsMeshView<'a>, transform:&'a PhysicsMeshTransform, )->TransformedMesh<'a>{ diff --git a/src/physics.rs b/src/physics.rs index 9caf231..0c5d325 100644 --- a/src/physics.rs +++ b/src/physics.rs @@ -419,7 +419,7 @@ impl HitboxMesh{ } } #[inline] - fn transformed_mesh(&self)->TransformedMesh{ + const fn transformed_mesh(&self)->TransformedMesh{ TransformedMesh::new(self.mesh.complete_mesh_view(),&self.transform) } }