From f91de2d66972713d3c78a264fd688f6f4c117651 Mon Sep 17 00:00:00 2001 From: Quaternions Date: Thu, 15 Feb 2024 01:41:26 -0800 Subject: [PATCH] mutable reference external api is unnecessary --- src/bsp.rs | 6 +++--- src/lib.rs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/bsp.rs b/src/bsp.rs index b657217..deb51ef 100644 --- a/src/bsp.rs +++ b/src/bsp.rs @@ -6,7 +6,7 @@ fn valve_transform(v:[f32;3])->integer::Planar64Vec3{ } pub fn convert_bsp( bsp:&vbsp::Bsp, - acquire_render_config_id:&mut AcquireRenderConfigId, + mut acquire_render_config_id:AcquireRenderConfigId, mut acquire_mesh_id:AcquireMeshId )->PartialMap1 where @@ -151,7 +151,7 @@ impl PartialMap1{ pub fn add_prop_meshes( self, prop_meshes:impl IntoIterator, - acquire_render_config_id:&mut AcquireRenderConfigId, + mut acquire_render_config_id:AcquireRenderConfigId, )->PartialMap2 where AcquireRenderConfigId:FnMut(Option<&str>)->model::RenderConfigId, @@ -160,7 +160,7 @@ impl PartialMap1{ attributes:self.attributes, prop_meshes:prop_meshes.into_iter().filter_map(|(mesh_id,model_data)| //this will generate new render ids and texture ids - match convert_mesh(model_data,acquire_render_config_id){ + match convert_mesh(model_data,&mut acquire_render_config_id){ Ok(mesh)=>Some((mesh_id,mesh)), Err(e)=>{ println!("error converting mesh: {e}"); diff --git a/src/lib.rs b/src/lib.rs index 81978ee..e8d4d91 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -26,7 +26,7 @@ pub fn read(mut input:R)->Result{ pub fn convert( bsp:&Bsp, - acquire_render_config_id:&mut AcquireRenderConfigId, + acquire_render_config_id:AcquireRenderConfigId, acquire_mesh_id:AcquireMeshId )->bsp::PartialMap1 where