deny(missing_docs) for bevy_diagnostic (#19482)
# Objective Deny missing docs in bevy_diagnostic, towards https://github.com/bevyengine/bevy/issues/3492.
This commit is contained in:
parent
e7a309ff5f
commit
c5dcef5e61
@ -19,8 +19,10 @@ impl Plugin for EntityCountDiagnosticsPlugin {
|
||||
}
|
||||
|
||||
impl EntityCountDiagnosticsPlugin {
|
||||
/// Number of currently allocated entities.
|
||||
pub const ENTITY_COUNT: DiagnosticPath = DiagnosticPath::const_new("entity_count");
|
||||
|
||||
/// Updates entity count measurement.
|
||||
pub fn diagnostic_system(mut diagnostics: Diagnostics, entities: &Entities) {
|
||||
diagnostics.add_measurement(&Self::ENTITY_COUNT, || entities.len() as f64);
|
||||
}
|
||||
|
@ -58,10 +58,16 @@ impl Plugin for FrameTimeDiagnosticsPlugin {
|
||||
}
|
||||
|
||||
impl FrameTimeDiagnosticsPlugin {
|
||||
/// Frames per second.
|
||||
pub const FPS: DiagnosticPath = DiagnosticPath::const_new("fps");
|
||||
|
||||
/// Total frames since application start.
|
||||
pub const FRAME_COUNT: DiagnosticPath = DiagnosticPath::const_new("frame_count");
|
||||
|
||||
/// Frame time in ms.
|
||||
pub const FRAME_TIME: DiagnosticPath = DiagnosticPath::const_new("frame_time");
|
||||
|
||||
/// Updates frame count, frame time and fps measurements.
|
||||
pub fn diagnostic_system(
|
||||
mut diagnostics: Diagnostics,
|
||||
time: Res<Time<Real>>,
|
||||
|
@ -1,4 +1,3 @@
|
||||
#![expect(missing_docs, reason = "Not all docs are written yet, see #3492.")]
|
||||
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
|
||||
#![forbid(unsafe_code)]
|
||||
#![doc(
|
||||
|
Loading…
Reference in New Issue
Block a user