Skip to content

Commit

Permalink
added multi-line string formatting (#8350)
Browse files Browse the repository at this point in the history
# 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>
  • Loading branch information
samtenna and mockersf authored Apr 13, 2023
1 parent c37a53d commit b9f3272
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions crates/bevy_render/src/render_resource/pipeline_specializer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)),
}))
}
}
Expand Down

0 comments on commit b9f3272

Please sign in to comment.