Skip to content

Commit 2ceb6a7

Browse files
committed
Fix small issues
1 parent 576fcc0 commit 2ceb6a7

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

crates/bevy_ecs/src/change_detection.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ impl Tick {
6868
/// When [`SmallTick`] value gets too old it is periodically updated to
6969
/// [`TickCounter::current() - SMALL_TICK_AGE_THRESHOLD`].
7070
///
71-
/// This way [`SmallTick::is_later`] with target older
71+
/// This way [`SmallTick::is_later_than`] with target older
7272
/// than `SMALL_TICK_AGE_THRESHOLD` may return false positive.
7373
/// Which is acceptable tradeoff given that too old targets should
7474
/// not occur outside some edge cases.
@@ -139,12 +139,12 @@ impl SmallTick {
139139
/// Yields [`Tick`] values.
140140
///
141141
/// On system without 64-bit atomics requires calls to
142-
/// [`TickCounter::maintenance`] to keep 32-bit atomic value from overflowing.
142+
/// [`TickCounter::maintain`] to keep 32-bit atomic value from overflowing.
143143
/// If overflow do occur then one of the calls to [`TickCounter::next`] would panic
144144
/// and successful calls to [`TickCounter::next`] and [`TickCounter::current`] would return
145145
/// out-of-order [`Tick`] values.
146146
/// Make sure to configure your code to either require `cfg(target_has_atomic = "64")`
147-
/// or arrange calls to [`TickCounter::maintenance`] frequently enough.
147+
/// or arrange calls to [`TickCounter::maintain`] frequently enough.
148148
pub struct TickCounter {
149149
#[cfg(not(target_has_atomic = "64"))]
150150
offset: NonZeroU64,

crates/bevy_ecs/src/query/state.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,8 @@ impl<Q: WorldQuery, F: ReadOnlyWorldQuery> QueryState<Q, F> {
528528
// SAFETY: query has unique world access
529529
unsafe {
530530
self.update_archetypes(world);
531-
self.iter_unchecked_manual(world, world.last_change_tick(), world.read_change_tick())
531+
let change_tick = world.change_tick();
532+
self.iter_unchecked_manual(world, world.last_change_tick(), change_tick)
532533
}
533534
}
534535

crates/bevy_ecs/src/world/mod.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,7 @@ use crate::{
2121
};
2222
use bevy_ptr::{OwningPtr, Ptr, UnsafeCellDeref};
2323
use bevy_utils::tracing::warn;
24-
use std::{
25-
any::TypeId,
26-
cell::UnsafeCell,
27-
fmt,
28-
};
24+
use std::{any::TypeId, cell::UnsafeCell, fmt};
2925
mod identifier;
3026

3127
pub use identifier::WorldId;

0 commit comments

Comments
 (0)