Make AccessConflicts::is_empty public (#18688)

# Objective

When implementing `SystemParam` for an object which contains a mutable
reference to World, which cannot be derived due to a required lifetime
parameter, it's necessary to check that there aren't any conflicts.

As far as I know, the is_empty method is the only way provided to check
for no conflicts at all
This commit is contained in:
1.11e-1f64 2025-04-28 22:48:46 +01:00 committed by GitHub
parent 19682aa4c3
commit 9fca353782
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -952,7 +952,8 @@ impl AccessConflicts {
}
}
pub(crate) fn is_empty(&self) -> bool {
/// Returns true if there are no conflicts present
pub fn is_empty(&self) -> bool {
match self {
Self::All => false,
Self::Individual(set) => set.is_empty(),