Skip to content

Commit 9fca353

Browse files
authored
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
1 parent 19682aa commit 9fca353

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

crates/bevy_ecs/src/query/access.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -952,7 +952,8 @@ impl AccessConflicts {
952952
}
953953
}
954954

955-
pub(crate) fn is_empty(&self) -> bool {
955+
/// Returns true if there are no conflicts present
956+
pub fn is_empty(&self) -> bool {
956957
match self {
957958
Self::All => false,
958959
Self::Individual(set) => set.is_empty(),

0 commit comments

Comments
 (0)