From b9f327217756afd922ff6dd789a46b06bf4d5a49 Mon Sep 17 00:00:00 2001 From: Sam T Date: Thu, 13 Apr 2023 19:00:17 +0100 Subject: [PATCH] added multi-line string formatting (#8350) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # Objective fixes #8348 ## Solution - Uses multi-line string with backslashes allowing rustfmt to work properly in the surrounding area. --------- Co-authored-by: François --- .../src/render_resource/pipeline_specializer.rs | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/crates/bevy_render/src/render_resource/pipeline_specializer.rs b/crates/bevy_render/src/render_resource/pipeline_specializer.rs index eba7ccb8e4..7fc8533830 100644 --- a/crates/bevy_render/src/render_resource/pipeline_specializer.rs +++ b/crates/bevy_render/src/render_resource/pipeline_specializer.rs @@ -141,16 +141,23 @@ impl SpecializedMeshPipelines { Ok(*entry.insert(match layout_map.entry(key) { Entry::Occupied(entry) => { if cfg!(debug_assertions) { - let stored_descriptor = cache.get_render_pipeline_descriptor(*entry.get()); + let stored_descriptor = + cache.get_render_pipeline_descriptor(*entry.get()); if stored_descriptor != &descriptor { - error!("The cached pipeline descriptor for {} is not equal to the generated descriptor for the given key. This means the SpecializePipeline implementation uses 'unused' MeshVertexBufferLayout information to specialize the pipeline. This is not allowed because it would invalidate the pipeline cache.", std::any::type_name::()); + error!( + "The cached pipeline descriptor for {} is not \ + equal to the generated descriptor for the given key. \ + This means the SpecializePipeline implementation uses \ + unused' MeshVertexBufferLayout information to specialize \ + the pipeline. This is not allowed because it would invalidate \ + the pipeline cache.", + std::any::type_name::() + ); } } *entry.into_mut() } - Entry::Vacant(entry) => { - *entry.insert(cache.queue_render_pipeline(descriptor)) - } + Entry::Vacant(entry) => *entry.insert(cache.queue_render_pipeline(descriptor)), })) } }