Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
cart committed Nov 8, 2020
1 parent 3893541 commit 96b2ef0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions crates/bevy_ecs/src/system/query/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ pub enum QueryError {
}

impl<'a, Q: HecsQuery> Query<'a, Q> {
/// # Safety
/// 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(
world: &'a World,
Expand Down
3 changes: 3 additions & 0 deletions crates/bevy_ecs/src/system/query/query_set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ pub trait QueryTuple {
}

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 {
QuerySet {
value: T::new(world, component_access),
Expand Down
3 changes: 3 additions & 0 deletions crates/bevy_ecs/src/system/system_param.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ use std::{any::TypeId, sync::Arc};

pub trait SystemParam: Sized {
fn init(system_state: &mut SystemState, world: &World, resources: &mut Resources);
/// # Safety
/// This call might access any of the input parameters in a safe way. Make sure the data access is safe in
/// the context of the system scheduler
unsafe fn get_param(
system_state: &mut SystemState,
world: &World,
Expand Down

0 comments on commit 96b2ef0

Please sign in to comment.