Skip to content

Commit

Permalink
Mark Query and QuerySet contructors as pub(crate) (#829)
Browse files Browse the repository at this point in the history
Mark Query and QuerySet contructors as pub(crate)
  • Loading branch information
memoryruins authored Nov 11, 2020
1 parent 60fa2d5 commit a68c217
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion crates/bevy_ecs/src/system/query/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ impl<'a, Q: HecsQuery> Query<'a, Q> {
/// This will create a Query that could violate memory safety rules. Make sure that this is only called in
/// ways that ensure the Queries have unique mutable access.
#[inline]
pub unsafe fn new(
pub(crate) unsafe fn new(
world: &'a World,
component_access: &'a TypeAccess<ArchetypeComponent>,
) -> Self {
Expand Down
5 changes: 4 additions & 1 deletion crates/bevy_ecs/src/system/query/query_set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ impl<T: QueryTuple> QuerySet<T> {
/// # Safety
/// This will create a set of Query types that could violate memory safety rules. Make sure that this is only called in
/// ways that ensure the Queries have unique mutable access.
pub unsafe fn new(world: &World, component_access: &TypeAccess<ArchetypeComponent>) -> Self {
pub(crate) unsafe fn new(
world: &World,
component_access: &TypeAccess<ArchetypeComponent>,
) -> Self {
QuerySet {
value: T::new(world, component_access),
}
Expand Down

0 comments on commit a68c217

Please sign in to comment.