Fix typo in B0001 message (#16860)

# Objective

Example error message beforehand:
```
error[B0001]: Query<&mut Data, ()> in system bevytest::main::{{closure}} accesses component(s)Data in a way that conflicts with a previous…
```
This commit is contained in:
SpecificProtagonist 2024-12-17 20:06:31 +01:00 committed by GitHub
parent df14443db9
commit bfa6553f9c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -354,8 +354,12 @@ fn assert_component_access_compatibility(
if conflicts.is_empty() {
return;
}
let accesses = conflicts.format_conflict_list(world);
panic!("error[B0001]: Query<{}, {}> in system {system_name} accesses component(s){accesses} in a way that conflicts with a previous system parameter. Consider using `Without<T>` to create disjoint Queries or merging conflicting Queries into a `ParamSet`. See: https://bevyengine.org/learn/errors/b0001", ShortName(query_type), ShortName(filter_type));
let mut accesses = conflicts.format_conflict_list(world);
// Access list may be empty (if access to all components requested)
if !accesses.is_empty() {
accesses.push(' ');
}
panic!("error[B0001]: Query<{}, {}> in system {system_name} accesses component(s) {accesses}in a way that conflicts with a previous system parameter. Consider using `Without<T>` to create disjoint Queries or merging conflicting Queries into a `ParamSet`. See: https://bevyengine.org/learn/errors/b0001", ShortName(query_type), ShortName(filter_type));
}
// SAFETY: Relevant query ComponentId and ArchetypeComponentId access is applied to SystemMeta. If