
# Objective - Fix adding `#![allow(clippy::type_complexity)]` everywhere. like #9796 ## Solution - Use the new [lints] table that will land in 1.74 (https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#lints) - inherit lint to the workspace, crates and examples. ``` [lints] workspace = true ``` ## Changelog - Bump rust version to 1.74 - Enable lints table for the workspace ```toml [workspace.lints.clippy] type_complexity = "allow" ``` - Allow type complexity for all crates and examples ```toml [lints] workspace = true ``` --------- Co-authored-by: Martín Maita <47983254+mnmaita@users.noreply.github.com>
30 lines
994 B
Rust
30 lines
994 B
Rust
mod diagnostic;
|
|
mod entity_count_diagnostics_plugin;
|
|
mod frame_time_diagnostics_plugin;
|
|
mod log_diagnostics_plugin;
|
|
mod system_information_diagnostics_plugin;
|
|
|
|
use bevy_app::prelude::*;
|
|
pub use diagnostic::*;
|
|
pub use entity_count_diagnostics_plugin::EntityCountDiagnosticsPlugin;
|
|
pub use frame_time_diagnostics_plugin::FrameTimeDiagnosticsPlugin;
|
|
pub use log_diagnostics_plugin::LogDiagnosticsPlugin;
|
|
pub use system_information_diagnostics_plugin::SystemInformationDiagnosticsPlugin;
|
|
|
|
/// Adds core diagnostics resources to an App.
|
|
#[derive(Default)]
|
|
pub struct DiagnosticsPlugin;
|
|
|
|
impl Plugin for DiagnosticsPlugin {
|
|
fn build(&self, app: &mut App) {
|
|
app.init_resource::<DiagnosticsStore>().add_systems(
|
|
Startup,
|
|
system_information_diagnostics_plugin::internal::log_system_info,
|
|
);
|
|
}
|
|
}
|
|
|
|
/// The width which diagnostic names will be printed as
|
|
/// Plugin names should not be longer than this value
|
|
pub const MAX_DIAGNOSTIC_NAME_WIDTH: usize = 32;
|