Skip to content

Commit 01ce75d

Browse files
Derive Debug for Framecount (#11573)
# Objective - I wanted this for an example, and I think it's a fundamentally handy debugging tool (with already public fields). ## Solution - `derive(Debug)` for `FrameCount`
1 parent 59b4921 commit 01ce75d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/bevy_core/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ fn tick_global_task_pools(_main_thread_marker: Option<NonSend<NonSendMarker>>) {
140140
/// [`FrameCount`] will wrap to 0 after exceeding [`u32::MAX`]. Within reasonable
141141
/// assumptions, one may exploit wrapping arithmetic to determine the number of frames
142142
/// that have elapsed between two observations – see [`u32::wrapping_sub()`].
143-
#[derive(Default, Resource, Clone, Copy)]
143+
#[derive(Debug, Default, Resource, Clone, Copy)]
144144
pub struct FrameCount(pub u32);
145145

146146
/// Adds frame counting functionality to Apps.

0 commit comments

Comments
 (0)