Skip to content

Commit

Permalink
Derive Debug for Framecount (bevyengine#11573)
Browse files Browse the repository at this point in the history
# 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`
  • Loading branch information
alice-i-cecile authored and tjamaan committed Feb 6, 2024
1 parent 4bf7584 commit 1258aa3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/bevy_core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ fn tick_global_task_pools(_main_thread_marker: Option<NonSend<NonSendMarker>>) {
/// [`FrameCount`] will wrap to 0 after exceeding [`u32::MAX`]. Within reasonable
/// assumptions, one may exploit wrapping arithmetic to determine the number of frames
/// that have elapsed between two observations – see [`u32::wrapping_sub()`].
#[derive(Default, Resource, Clone, Copy)]
#[derive(Debug, Default, Resource, Clone, Copy)]
pub struct FrameCount(pub u32);

/// Adds frame counting functionality to Apps.
Expand Down

0 comments on commit 1258aa3

Please sign in to comment.