added multi-line string formatting (#8350)

# Objective

fixes #8348

## Solution

- Uses multi-line string with backslashes allowing rustfmt to work
properly in the surrounding area.

---------

Co-authored-by: François <mockersf@gmail.com>
This commit is contained in:
Sam T 2023-04-13 19:00:17 +01:00 committed by GitHub
parent c37a53d52d
commit b9f3272177
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -141,16 +141,23 @@ impl<S: SpecializedMeshPipeline> SpecializedMeshPipelines<S> {
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::<S>());
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::<S>()
);
}
}
*entry.into_mut()
}
Entry::Vacant(entry) => {
*entry.insert(cache.queue_render_pipeline(descriptor))
}
Entry::Vacant(entry) => *entry.insert(cache.queue_render_pipeline(descriptor)),
}))
}
}