From 09b9f3c1cbd93c75b2fe69257b278ad3f993adf4 Mon Sep 17 00:00:00 2001 From: HampusM Date: Sun, 24 Nov 2024 21:04:30 +0100 Subject: refactor(engine): remove 'debug' crate feature flag --- engine/src/file_format/wavefront/mtl.rs | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'engine/src/file_format/wavefront') diff --git a/engine/src/file_format/wavefront/mtl.rs b/engine/src/file_format/wavefront/mtl.rs index ef6e894..d90dbcf 100644 --- a/engine/src/file_format/wavefront/mtl.rs +++ b/engine/src/file_format/wavefront/mtl.rs @@ -44,7 +44,6 @@ pub fn parse(obj_content: &str) -> Result, Error> .filter(|(_, statement)| matches!(statement.keyword, Keyword::Newmtl)) .count(); - #[cfg(feature = "debug")] tracing::debug!("Material count: {material_cnt}"); statements_to_materials(statements, material_cnt) @@ -93,7 +92,7 @@ pub enum Error }, } -#[cfg_attr(feature = "debug", tracing::instrument(skip_all))] +#[tracing::instrument(skip_all)] fn statements_to_materials( statements: impl IntoIterator)>, material_cnt: usize, @@ -110,7 +109,6 @@ fn statements_to_materials( for (line_no, statement) in statements { if statement.keyword == Keyword::Newmtl { if curr_material.ready { - #[cfg(feature = "debug")] tracing::debug!("Building material"); let material = curr_material.material_builder.clone().build(); @@ -135,7 +133,6 @@ fn statements_to_materials( Keyword::Ka => { let color = get_color_from_statement(&statement, line_no)?; - #[cfg(feature = "debug")] tracing::debug!("Adding ambient color"); curr_material.material_builder = @@ -144,7 +141,6 @@ fn statements_to_materials( Keyword::Kd => { let color = get_color_from_statement(&statement, line_no)?; - #[cfg(feature = "debug")] tracing::debug!("Adding diffuse color"); curr_material.material_builder = @@ -153,7 +149,6 @@ fn statements_to_materials( Keyword::Ks => { let color = get_color_from_statement(&statement, line_no)?; - #[cfg(feature = "debug")] tracing::debug!("Adding specular color"); curr_material.material_builder = @@ -172,7 +167,6 @@ fn statements_to_materials( let texture = Texture::open(Path::new(texture_file_path))?; - #[cfg(feature = "debug")] tracing::debug!("Adding ambient map"); let texture_id = texture.id(); @@ -185,7 +179,6 @@ fn statements_to_materials( Keyword::MapKd => { let texture = get_map_from_texture(&statement, line_no)?; - #[cfg(feature = "debug")] tracing::debug!("Adding diffuse map"); let texture_id = texture.id(); @@ -198,7 +191,6 @@ fn statements_to_materials( Keyword::MapKs => { let texture = get_map_from_texture(&statement, line_no)?; - #[cfg(feature = "debug")] tracing::debug!("Adding specular map"); let texture_id = texture.id(); @@ -213,7 +205,6 @@ fn statements_to_materials( } if curr_material.ready { - #[cfg(feature = "debug")] tracing::debug!("Building last material"); let material = curr_material.material_builder.build(); -- cgit v1.2.3-18-g5258