From 951c9bb1a25caddc97ac69bbe8a2937f97227e90 Mon Sep 17 00:00:00 2001 From: Ame <104745335+ameknite@users.noreply.github.com> Date: Sat, 18 Nov 2023 14:58:48 -0600 Subject: [PATCH] Add [lints] table, fix adding `#![allow(clippy::type_complexity)]` everywhere (#10011) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # 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> --- Cargo.toml | 8 +++++++- crates/bevy_a11y/Cargo.toml | 3 +++ crates/bevy_a11y/src/lib.rs | 1 - crates/bevy_animation/Cargo.toml | 3 +++ crates/bevy_animation/src/lib.rs | 1 - crates/bevy_app/Cargo.toml | 2 ++ crates/bevy_app/src/lib.rs | 1 - crates/bevy_asset/Cargo.toml | 3 +++ crates/bevy_asset/macros/Cargo.toml | 3 +++ crates/bevy_asset/src/lib.rs | 2 -- crates/bevy_audio/Cargo.toml | 4 +++- crates/bevy_audio/src/lib.rs | 1 - crates/bevy_core/Cargo.toml | 3 +++ crates/bevy_core/src/lib.rs | 2 +- crates/bevy_core_pipeline/Cargo.toml | 3 +++ crates/bevy_core_pipeline/src/lib.rs | 2 -- crates/bevy_derive/Cargo.toml | 3 +++ crates/bevy_derive/src/lib.rs | 2 -- crates/bevy_diagnostic/Cargo.toml | 3 +++ crates/bevy_diagnostic/src/lib.rs | 2 -- crates/bevy_dylib/Cargo.toml | 3 +++ crates/bevy_dylib/src/lib.rs | 1 - crates/bevy_dynamic_plugin/Cargo.toml | 3 +++ crates/bevy_dynamic_plugin/src/lib.rs | 2 -- crates/bevy_ecs/Cargo.toml | 3 +++ crates/bevy_ecs/macros/Cargo.toml | 3 +++ crates/bevy_ecs/src/lib.rs | 1 - crates/bevy_ecs_compile_fail_tests/src/lib.rs | 2 -- crates/bevy_encase_derive/Cargo.toml | 3 +++ crates/bevy_encase_derive/src/lib.rs | 2 -- crates/bevy_gilrs/Cargo.toml | 3 +++ crates/bevy_gilrs/src/lib.rs | 1 - crates/bevy_gizmos/Cargo.toml | 3 +++ crates/bevy_gizmos/src/lib.rs | 1 - crates/bevy_gltf/Cargo.toml | 3 +++ crates/bevy_gltf/src/lib.rs | 2 +- crates/bevy_hierarchy/Cargo.toml | 3 +++ crates/bevy_hierarchy/src/lib.rs | 1 - crates/bevy_input/Cargo.toml | 3 +++ crates/bevy_input/src/lib.rs | 1 - crates/bevy_internal/Cargo.toml | 3 +++ crates/bevy_internal/src/lib.rs | 1 - crates/bevy_log/Cargo.toml | 3 +++ crates/bevy_log/src/lib.rs | 1 - crates/bevy_macro_utils/Cargo.toml | 3 +++ crates/bevy_macro_utils/src/lib.rs | 1 - crates/bevy_math/Cargo.toml | 3 +++ crates/bevy_math/src/lib.rs | 1 - crates/bevy_mikktspace/Cargo.toml | 3 +++ crates/bevy_mikktspace/src/lib.rs | 1 - crates/bevy_pbr/Cargo.toml | 3 +++ crates/bevy_pbr/src/lib.rs | 2 -- crates/bevy_ptr/Cargo.toml | 3 +++ crates/bevy_ptr/src/lib.rs | 1 - crates/bevy_reflect/Cargo.toml | 3 +++ crates/bevy_reflect/bevy_reflect_derive/Cargo.toml | 3 +++ crates/bevy_reflect/src/lib.rs | 1 - crates/bevy_render/Cargo.toml | 3 +++ crates/bevy_render/macros/Cargo.toml | 3 +++ crates/bevy_render/src/lib.rs | 2 -- crates/bevy_scene/Cargo.toml | 3 +++ crates/bevy_scene/src/lib.rs | 1 - crates/bevy_sprite/Cargo.toml | 3 +++ crates/bevy_sprite/src/lib.rs | 2 -- crates/bevy_tasks/Cargo.toml | 3 +++ crates/bevy_tasks/src/lib.rs | 1 - crates/bevy_text/Cargo.toml | 3 +++ crates/bevy_text/src/lib.rs | 2 -- crates/bevy_time/Cargo.toml | 3 +++ crates/bevy_time/src/lib.rs | 1 - crates/bevy_transform/Cargo.toml | 3 +++ crates/bevy_transform/src/lib.rs | 1 - crates/bevy_ui/Cargo.toml | 3 +++ crates/bevy_ui/src/lib.rs | 2 -- crates/bevy_utils/Cargo.toml | 3 +++ crates/bevy_utils/macros/Cargo.toml | 3 +++ crates/bevy_utils/src/lib.rs | 2 +- crates/bevy_window/Cargo.toml | 3 +++ crates/bevy_window/src/lib.rs | 1 - crates/bevy_winit/Cargo.toml | 3 +++ crates/bevy_winit/src/lib.rs | 1 - examples/2d/mesh2d_manual.rs | 2 -- examples/3d/anti_aliasing.rs | 4 ---- examples/3d/shadow_caster_receiver.rs | 4 ---- examples/3d/ssao.rs | 4 ---- examples/3d/transmission.rs | 4 ---- examples/ecs/custom_query_param.rs | 4 ---- examples/ecs/state.rs | 4 ---- examples/games/alien_cake_addict.rs | 4 ---- examples/games/game_menu.rs | 4 ---- examples/input/text_input.rs | 4 ---- examples/mobile/Cargo.toml | 2 ++ examples/mobile/src/lib.rs | 4 ---- examples/tools/scene_viewer/scene_viewer_plugin.rs | 4 ---- examples/ui/button.rs | 4 ---- 95 files changed, 137 insertions(+), 102 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index ae4637c77c..6e1bafd1dd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,7 +10,7 @@ keywords = ["game", "engine", "gamedev", "graphics", "bevy"] license = "MIT OR Apache-2.0" readme = "README.md" repository = "https://github.com/bevyengine/bevy" -rust-version = "1.70.0" +rust-version = "1.74.0" [workspace] exclude = [ @@ -29,6 +29,12 @@ members = [ "errors", ] +[workspace.lints.clippy] +type_complexity = "allow" + +[lints] +workspace = true + [features] default = [ "animation", diff --git a/crates/bevy_a11y/Cargo.toml b/crates/bevy_a11y/Cargo.toml index f4aed85f15..d95482ee3b 100644 --- a/crates/bevy_a11y/Cargo.toml +++ b/crates/bevy_a11y/Cargo.toml @@ -15,3 +15,6 @@ bevy_derive = { path = "../bevy_derive", version = "0.12.0" } bevy_ecs = { path = "../bevy_ecs", version = "0.12.0" } accesskit = "0.12" + +[lints] +workspace = true diff --git a/crates/bevy_a11y/src/lib.rs b/crates/bevy_a11y/src/lib.rs index 576b920f41..4a1948c065 100644 --- a/crates/bevy_a11y/src/lib.rs +++ b/crates/bevy_a11y/src/lib.rs @@ -1,7 +1,6 @@ //! Accessibility for Bevy #![warn(missing_docs)] -#![allow(clippy::type_complexity)] #![forbid(unsafe_code)] use std::sync::{ diff --git a/crates/bevy_animation/Cargo.toml b/crates/bevy_animation/Cargo.toml index 45796ffc66..698c243f23 100644 --- a/crates/bevy_animation/Cargo.toml +++ b/crates/bevy_animation/Cargo.toml @@ -21,3 +21,6 @@ bevy_utils = { path = "../bevy_utils", version = "0.12.0" } bevy_ecs = { path = "../bevy_ecs", version = "0.12.0" } bevy_transform = { path = "../bevy_transform", version = "0.12.0" } bevy_hierarchy = { path = "../bevy_hierarchy", version = "0.12.0" } + +[lints] +workspace = true diff --git a/crates/bevy_animation/src/lib.rs b/crates/bevy_animation/src/lib.rs index e7896dcaa8..1e62fa7f10 100644 --- a/crates/bevy_animation/src/lib.rs +++ b/crates/bevy_animation/src/lib.rs @@ -1,7 +1,6 @@ //! Animation for the game engine Bevy #![warn(missing_docs)] -#![allow(clippy::type_complexity)] use std::ops::Deref; use std::time::Duration; diff --git a/crates/bevy_app/Cargo.toml b/crates/bevy_app/Cargo.toml index 65e920fbbd..db5ed32e74 100644 --- a/crates/bevy_app/Cargo.toml +++ b/crates/bevy_app/Cargo.toml @@ -32,3 +32,5 @@ downcast-rs = "1.2.0" wasm-bindgen = { version = "0.2" } web-sys = { version = "0.3", features = [ "Window" ] } +[lints] +workspace = true diff --git a/crates/bevy_app/src/lib.rs b/crates/bevy_app/src/lib.rs index 3439620a46..9aaabc25ee 100644 --- a/crates/bevy_app/src/lib.rs +++ b/crates/bevy_app/src/lib.rs @@ -1,7 +1,6 @@ //! This crate is about everything concerning the highest-level, application layer of a Bevy app. #![warn(missing_docs)] -#![allow(clippy::type_complexity)] mod app; mod main_schedule; diff --git a/crates/bevy_asset/Cargo.toml b/crates/bevy_asset/Cargo.toml index eb5e2ce6a2..c088c61ac4 100644 --- a/crates/bevy_asset/Cargo.toml +++ b/crates/bevy_asset/Cargo.toml @@ -53,3 +53,6 @@ notify-debouncer-full = { version = "0.3.1", optional = true } [dev-dependencies] bevy_core = { path = "../bevy_core", version = "0.12.0" } + +[lints] +workspace = true diff --git a/crates/bevy_asset/macros/Cargo.toml b/crates/bevy_asset/macros/Cargo.toml index d1ccd85035..bf0d46725c 100644 --- a/crates/bevy_asset/macros/Cargo.toml +++ b/crates/bevy_asset/macros/Cargo.toml @@ -17,3 +17,6 @@ bevy_macro_utils = { path = "../../bevy_macro_utils", version = "0.12.0" } syn = "2.0" proc-macro2 = "1.0" quote = "1.0" + +[lints] +workspace = true diff --git a/crates/bevy_asset/src/lib.rs b/crates/bevy_asset/src/lib.rs index 004f87a857..a783d20847 100644 --- a/crates/bevy_asset/src/lib.rs +++ b/crates/bevy_asset/src/lib.rs @@ -1,5 +1,3 @@ -#![allow(clippy::type_complexity)] - pub mod io; pub mod meta; pub mod processor; diff --git a/crates/bevy_audio/Cargo.toml b/crates/bevy_audio/Cargo.toml index 652defe88d..60de4c82af 100644 --- a/crates/bevy_audio/Cargo.toml +++ b/crates/bevy_audio/Cargo.toml @@ -28,7 +28,6 @@ oboe = { version = "0.5", optional = true } [target.'cfg(target_arch = "wasm32")'.dependencies] rodio = { version = "0.17", default-features = false, features = ["wasm-bindgen"] } - [features] mp3 = ["rodio/mp3"] flac = ["rodio/flac"] @@ -43,3 +42,6 @@ symphonia-vorbis = ["rodio/symphonia-vorbis"] symphonia-wav = ["rodio/symphonia-wav"] # Enable using a shared stdlib for cxx on Android. android_shared_stdcxx = ["oboe/shared-stdcxx"] + +[lints] +workspace = true diff --git a/crates/bevy_audio/src/lib.rs b/crates/bevy_audio/src/lib.rs index 1a595ad1c7..5c08a079ce 100644 --- a/crates/bevy_audio/src/lib.rs +++ b/crates/bevy_audio/src/lib.rs @@ -21,7 +21,6 @@ //! ``` #![forbid(unsafe_code)] -#![allow(clippy::type_complexity)] #![warn(missing_docs)] mod audio; diff --git a/crates/bevy_core/Cargo.toml b/crates/bevy_core/Cargo.toml index 231b9bdcf5..3ca9f6b46c 100644 --- a/crates/bevy_core/Cargo.toml +++ b/crates/bevy_core/Cargo.toml @@ -27,3 +27,6 @@ serialize = ["dep:serde"] [dev-dependencies] crossbeam-channel = "0.5.0" + +[lints] +workspace = true diff --git a/crates/bevy_core/src/lib.rs b/crates/bevy_core/src/lib.rs index c222af6a9d..c925bc9936 100644 --- a/crates/bevy_core/src/lib.rs +++ b/crates/bevy_core/src/lib.rs @@ -1,5 +1,5 @@ #![warn(missing_docs)] -#![allow(clippy::type_complexity)] + //! This crate provides core functionality for Bevy Engine. mod name; diff --git a/crates/bevy_core_pipeline/Cargo.toml b/crates/bevy_core_pipeline/Cargo.toml index e2bdf17000..394ffe67f1 100644 --- a/crates/bevy_core_pipeline/Cargo.toml +++ b/crates/bevy_core_pipeline/Cargo.toml @@ -34,3 +34,6 @@ bevy_utils = { path = "../bevy_utils", version = "0.12.0" } serde = { version = "1", features = ["derive"] } bitflags = "2.3" radsort = "0.1" + +[lints] +workspace = true diff --git a/crates/bevy_core_pipeline/src/lib.rs b/crates/bevy_core_pipeline/src/lib.rs index ec119ad5ae..f710b8c704 100644 --- a/crates/bevy_core_pipeline/src/lib.rs +++ b/crates/bevy_core_pipeline/src/lib.rs @@ -1,5 +1,3 @@ -#![allow(clippy::type_complexity)] - pub mod blit; pub mod bloom; pub mod clear_color; diff --git a/crates/bevy_derive/Cargo.toml b/crates/bevy_derive/Cargo.toml index 9e51c0e5ca..f8d081f029 100644 --- a/crates/bevy_derive/Cargo.toml +++ b/crates/bevy_derive/Cargo.toml @@ -16,3 +16,6 @@ bevy_macro_utils = { path = "../bevy_macro_utils", version = "0.12.0" } quote = "1.0" syn = { version = "2.0", features = ["full"] } + +[lints] +workspace = true diff --git a/crates/bevy_derive/src/lib.rs b/crates/bevy_derive/src/lib.rs index b6766c0dc8..18d61262ee 100644 --- a/crates/bevy_derive/src/lib.rs +++ b/crates/bevy_derive/src/lib.rs @@ -1,5 +1,3 @@ -#![allow(clippy::type_complexity)] - extern crate proc_macro; mod app_plugin; diff --git a/crates/bevy_diagnostic/Cargo.toml b/crates/bevy_diagnostic/Cargo.toml index 18e3d0e27c..cfbc41b295 100644 --- a/crates/bevy_diagnostic/Cargo.toml +++ b/crates/bevy_diagnostic/Cargo.toml @@ -31,3 +31,6 @@ sysinfo = { version = "0.29.0", default-features = false, features = [ # Only include when not bevy_dynamic_plugin and on linux/windows/android [target.'cfg(any(target_os = "linux", target_os = "windows", target_os = "android"))'.dependencies] sysinfo = { version = "0.29.0", default-features = false } + +[lints] +workspace = true diff --git a/crates/bevy_diagnostic/src/lib.rs b/crates/bevy_diagnostic/src/lib.rs index 0422df0cb4..aaa0ea449a 100644 --- a/crates/bevy_diagnostic/src/lib.rs +++ b/crates/bevy_diagnostic/src/lib.rs @@ -1,5 +1,3 @@ -#![allow(clippy::type_complexity)] - mod diagnostic; mod entity_count_diagnostics_plugin; mod frame_time_diagnostics_plugin; diff --git a/crates/bevy_dylib/Cargo.toml b/crates/bevy_dylib/Cargo.toml index e08f560983..f85950952e 100644 --- a/crates/bevy_dylib/Cargo.toml +++ b/crates/bevy_dylib/Cargo.toml @@ -13,3 +13,6 @@ crate-type = ["dylib"] [dependencies] bevy_internal = { path = "../bevy_internal", version = "0.12.0", default-features = false } + +[lints] +workspace = true diff --git a/crates/bevy_dylib/src/lib.rs b/crates/bevy_dylib/src/lib.rs index 2c5d642967..a950f985d6 100644 --- a/crates/bevy_dylib/src/lib.rs +++ b/crates/bevy_dylib/src/lib.rs @@ -1,5 +1,4 @@ #![warn(missing_docs)] -#![allow(clippy::type_complexity)] #![allow(clippy::single_component_path_imports)] //! Forces dynamic linking of Bevy. diff --git a/crates/bevy_dynamic_plugin/Cargo.toml b/crates/bevy_dynamic_plugin/Cargo.toml index 38164324a0..f21424ea47 100644 --- a/crates/bevy_dynamic_plugin/Cargo.toml +++ b/crates/bevy_dynamic_plugin/Cargo.toml @@ -15,3 +15,6 @@ bevy_app = { path = "../bevy_app", version = "0.12.0" } # other libloading = { version = "0.8" } thiserror = "1.0" + +[lints] +workspace = true diff --git a/crates/bevy_dynamic_plugin/src/lib.rs b/crates/bevy_dynamic_plugin/src/lib.rs index ee59ff2cb1..4ff6f92606 100644 --- a/crates/bevy_dynamic_plugin/src/lib.rs +++ b/crates/bevy_dynamic_plugin/src/lib.rs @@ -1,5 +1,3 @@ -#![allow(clippy::type_complexity)] - mod loader; pub use loader::*; diff --git a/crates/bevy_ecs/Cargo.toml b/crates/bevy_ecs/Cargo.toml index 82d5736118..3231e7b410 100644 --- a/crates/bevy_ecs/Cargo.toml +++ b/crates/bevy_ecs/Cargo.toml @@ -44,3 +44,6 @@ path = "examples/resources.rs" [[example]] name = "change_detection" path = "examples/change_detection.rs" + +[lints] +workspace = true diff --git a/crates/bevy_ecs/macros/Cargo.toml b/crates/bevy_ecs/macros/Cargo.toml index d19d740497..035a29ff82 100644 --- a/crates/bevy_ecs/macros/Cargo.toml +++ b/crates/bevy_ecs/macros/Cargo.toml @@ -14,3 +14,6 @@ bevy_macro_utils = { path = "../../bevy_macro_utils", version = "0.12.0" } syn = "2.0" quote = "1.0" proc-macro2 = "1.0" + +[lints] +workspace = true diff --git a/crates/bevy_ecs/src/lib.rs b/crates/bevy_ecs/src/lib.rs index f971697beb..71109585f2 100644 --- a/crates/bevy_ecs/src/lib.rs +++ b/crates/bevy_ecs/src/lib.rs @@ -1,6 +1,5 @@ #![warn(clippy::undocumented_unsafe_blocks)] #![warn(missing_docs)] -#![allow(clippy::type_complexity)] #![doc = include_str!("../README.md")] #[cfg(target_pointer_width = "16")] diff --git a/crates/bevy_ecs_compile_fail_tests/src/lib.rs b/crates/bevy_ecs_compile_fail_tests/src/lib.rs index e12684f764..d0d1683dd6 100644 --- a/crates/bevy_ecs_compile_fail_tests/src/lib.rs +++ b/crates/bevy_ecs_compile_fail_tests/src/lib.rs @@ -1,3 +1 @@ -#![allow(clippy::type_complexity)] - // Nothing here, check out the integration tests diff --git a/crates/bevy_encase_derive/Cargo.toml b/crates/bevy_encase_derive/Cargo.toml index 311b11c6e6..b6c65e2d69 100644 --- a/crates/bevy_encase_derive/Cargo.toml +++ b/crates/bevy_encase_derive/Cargo.toml @@ -14,3 +14,6 @@ proc-macro = true [dependencies] bevy_macro_utils = { path = "../bevy_macro_utils", version = "0.12.0" } encase_derive_impl = "0.6.1" + +[lints] +workspace = true diff --git a/crates/bevy_encase_derive/src/lib.rs b/crates/bevy_encase_derive/src/lib.rs index cc81b6edd5..d57be9f85c 100644 --- a/crates/bevy_encase_derive/src/lib.rs +++ b/crates/bevy_encase_derive/src/lib.rs @@ -1,5 +1,3 @@ -#![allow(clippy::type_complexity)] - use bevy_macro_utils::BevyManifest; use encase_derive_impl::{implement, syn}; diff --git a/crates/bevy_gilrs/Cargo.toml b/crates/bevy_gilrs/Cargo.toml index 250ad5fbfd..b6439c42e1 100644 --- a/crates/bevy_gilrs/Cargo.toml +++ b/crates/bevy_gilrs/Cargo.toml @@ -20,3 +20,6 @@ bevy_time = { path = "../bevy_time", version = "0.12.0" } # other gilrs = "0.10.1" thiserror = "1.0" + +[lints] +workspace = true diff --git a/crates/bevy_gilrs/src/lib.rs b/crates/bevy_gilrs/src/lib.rs index 39172a4053..46867b73a2 100644 --- a/crates/bevy_gilrs/src/lib.rs +++ b/crates/bevy_gilrs/src/lib.rs @@ -3,7 +3,6 @@ //! This crate is built on top of [GilRs](gilrs), a library //! that handles abstracting over platform-specific gamepad APIs. -#![allow(clippy::type_complexity)] #![warn(missing_docs)] mod converter; diff --git a/crates/bevy_gizmos/Cargo.toml b/crates/bevy_gizmos/Cargo.toml index 0917b71f97..1f404d1bfc 100644 --- a/crates/bevy_gizmos/Cargo.toml +++ b/crates/bevy_gizmos/Cargo.toml @@ -25,3 +25,6 @@ bevy_core = { path = "../bevy_core", version = "0.12.0" } bevy_reflect = { path = "../bevy_reflect", version = "0.12.0" } bevy_core_pipeline = { path = "../bevy_core_pipeline", version = "0.12.0" } bevy_transform = { path = "../bevy_transform", version = "0.12.0" } + +[lints] +workspace = true diff --git a/crates/bevy_gizmos/src/lib.rs b/crates/bevy_gizmos/src/lib.rs index 5ad9d8934d..f21f1c7424 100644 --- a/crates/bevy_gizmos/src/lib.rs +++ b/crates/bevy_gizmos/src/lib.rs @@ -1,4 +1,3 @@ -#![allow(clippy::type_complexity)] #![warn(missing_docs)] //! This crate adds an immediate mode drawing api to Bevy for visual debugging. diff --git a/crates/bevy_gltf/Cargo.toml b/crates/bevy_gltf/Cargo.toml index 8aa900018b..a6339679fd 100644 --- a/crates/bevy_gltf/Cargo.toml +++ b/crates/bevy_gltf/Cargo.toml @@ -47,3 +47,6 @@ base64 = "0.13.0" percent-encoding = "2.1" serde = { version = "1.0", features = ["derive"] } serde_json = "1" + +[lints] +workspace = true diff --git a/crates/bevy_gltf/src/lib.rs b/crates/bevy_gltf/src/lib.rs index 559c8ae3c8..fe47fd4dfd 100644 --- a/crates/bevy_gltf/src/lib.rs +++ b/crates/bevy_gltf/src/lib.rs @@ -2,7 +2,7 @@ //! for loading glTF 2.0 (a standard 3D scene definition format) files in Bevy. //! //! The [glTF 2.0 specification](https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html) defines the format of the glTF files. -#![allow(clippy::type_complexity)] + #![warn(missing_docs)] #[cfg(feature = "bevy_animation")] diff --git a/crates/bevy_hierarchy/Cargo.toml b/crates/bevy_hierarchy/Cargo.toml index 20c6b86811..1f425a1f5b 100644 --- a/crates/bevy_hierarchy/Cargo.toml +++ b/crates/bevy_hierarchy/Cargo.toml @@ -22,3 +22,6 @@ bevy_utils = { path = "../bevy_utils", version = "0.12.0" } # other smallvec = { version = "1.6", features = ["serde", "union", "const_generics"] } + +[lints] +workspace = true diff --git a/crates/bevy_hierarchy/src/lib.rs b/crates/bevy_hierarchy/src/lib.rs index d616e5384a..f156086b1a 100644 --- a/crates/bevy_hierarchy/src/lib.rs +++ b/crates/bevy_hierarchy/src/lib.rs @@ -1,4 +1,3 @@ -#![allow(clippy::type_complexity)] #![warn(missing_docs)] //! `bevy_hierarchy` can be used to define hierarchies of entities. //! diff --git a/crates/bevy_input/Cargo.toml b/crates/bevy_input/Cargo.toml index 9f2ce32800..a744fde616 100644 --- a/crates/bevy_input/Cargo.toml +++ b/crates/bevy_input/Cargo.toml @@ -28,3 +28,6 @@ thiserror = "1.0" [dev-dependencies] bevy = { path = "../../", version = "0.12.0" } + +[lints] +workspace = true diff --git a/crates/bevy_input/src/lib.rs b/crates/bevy_input/src/lib.rs index 7af8fec03a..259b1623f1 100644 --- a/crates/bevy_input/src/lib.rs +++ b/crates/bevy_input/src/lib.rs @@ -1,4 +1,3 @@ -#![allow(clippy::type_complexity)] #![warn(missing_docs)] //! Input functionality for the [Bevy game engine](https://bevyengine.org/). diff --git a/crates/bevy_internal/Cargo.toml b/crates/bevy_internal/Cargo.toml index a9c46dd06a..525d732c89 100644 --- a/crates/bevy_internal/Cargo.toml +++ b/crates/bevy_internal/Cargo.toml @@ -153,3 +153,6 @@ bevy_ui = { path = "../bevy_ui", optional = true, version = "0.12.0" } bevy_winit = { path = "../bevy_winit", optional = true, version = "0.12.0" } bevy_gilrs = { path = "../bevy_gilrs", optional = true, version = "0.12.0" } bevy_gizmos = { path = "../bevy_gizmos", optional = true, version = "0.12.0", default-features = false } + +[lints] +workspace = true diff --git a/crates/bevy_internal/src/lib.rs b/crates/bevy_internal/src/lib.rs index 8e6bf57e52..42b368375a 100644 --- a/crates/bevy_internal/src/lib.rs +++ b/crates/bevy_internal/src/lib.rs @@ -1,4 +1,3 @@ -#![allow(clippy::type_complexity)] #![warn(missing_docs)] //! This module is separated into its own crate to enable simple dynamic linking for Bevy, and should not be used directly diff --git a/crates/bevy_log/Cargo.toml b/crates/bevy_log/Cargo.toml index 4075942ae4..12b20caa4f 100644 --- a/crates/bevy_log/Cargo.toml +++ b/crates/bevy_log/Cargo.toml @@ -30,3 +30,6 @@ android_log-sys = "0.3.0" [target.'cfg(target_arch = "wasm32")'.dependencies] console_error_panic_hook = "0.1.6" tracing-wasm = "0.2.1" + +[lints] +workspace = true diff --git a/crates/bevy_log/src/lib.rs b/crates/bevy_log/src/lib.rs index a912d7d984..cc8d3e7a47 100644 --- a/crates/bevy_log/src/lib.rs +++ b/crates/bevy_log/src/lib.rs @@ -1,4 +1,3 @@ -#![allow(clippy::type_complexity)] #![warn(missing_docs)] //! This crate provides logging functions and configuration for [Bevy](https://bevyengine.org) //! apps, and automatically configures platform specific log handlers (i.e. WASM or Android). diff --git a/crates/bevy_macro_utils/Cargo.toml b/crates/bevy_macro_utils/Cargo.toml index b790c8c9fa..88082b5a1e 100644 --- a/crates/bevy_macro_utils/Cargo.toml +++ b/crates/bevy_macro_utils/Cargo.toml @@ -14,3 +14,6 @@ syn = "2.0" quote = "1.0" rustc-hash = "1.0" proc-macro2 = "1.0" + +[lints] +workspace = true diff --git a/crates/bevy_macro_utils/src/lib.rs b/crates/bevy_macro_utils/src/lib.rs index 2363d61cf0..d14a2c6db7 100644 --- a/crates/bevy_macro_utils/src/lib.rs +++ b/crates/bevy_macro_utils/src/lib.rs @@ -1,4 +1,3 @@ -#![allow(clippy::type_complexity)] #![warn(missing_docs)] #![deny(unsafe_code)] //! A collection of helper types and functions for working on macros within the Bevy ecosystem. diff --git a/crates/bevy_math/Cargo.toml b/crates/bevy_math/Cargo.toml index 09daa7d938..7ee418a421 100644 --- a/crates/bevy_math/Cargo.toml +++ b/crates/bevy_math/Cargo.toml @@ -20,3 +20,6 @@ mint = ["glam/mint"] glam_assert = ["glam/glam-assert"] # Enable assertions in debug builds to check the validity of parameters passed to glam debug_glam_assert = ["glam/debug-glam-assert"] + +[lints] +workspace = true diff --git a/crates/bevy_math/src/lib.rs b/crates/bevy_math/src/lib.rs index 31ff134cf3..4d44d095c8 100644 --- a/crates/bevy_math/src/lib.rs +++ b/crates/bevy_math/src/lib.rs @@ -4,7 +4,6 @@ //! matrices like [`Mat2`], [`Mat3`] and [`Mat4`] and orientation representations //! like [`Quat`]. -#![allow(clippy::type_complexity)] #![warn(missing_docs)] mod affine3; diff --git a/crates/bevy_mikktspace/Cargo.toml b/crates/bevy_mikktspace/Cargo.toml index 105e730591..9698b67301 100644 --- a/crates/bevy_mikktspace/Cargo.toml +++ b/crates/bevy_mikktspace/Cargo.toml @@ -15,3 +15,6 @@ glam = "0.24.1" [[example]] name = "generate" + +[lints] +workspace = true diff --git a/crates/bevy_mikktspace/src/lib.rs b/crates/bevy_mikktspace/src/lib.rs index 365c273480..89d7b05427 100644 --- a/crates/bevy_mikktspace/src/lib.rs +++ b/crates/bevy_mikktspace/src/lib.rs @@ -1,4 +1,3 @@ -#![allow(clippy::type_complexity)] #![allow(clippy::all)] use glam::{Vec2, Vec3}; diff --git a/crates/bevy_pbr/Cargo.toml b/crates/bevy_pbr/Cargo.toml index 14759e5b7f..d959af147b 100644 --- a/crates/bevy_pbr/Cargo.toml +++ b/crates/bevy_pbr/Cargo.toml @@ -35,3 +35,6 @@ radsort = "0.1" naga_oil = "0.10" smallvec = "1.6" thread_local = "1.0" + +[lints] +workspace = true diff --git a/crates/bevy_pbr/src/lib.rs b/crates/bevy_pbr/src/lib.rs index 8e1cfdd41d..d50c402888 100644 --- a/crates/bevy_pbr/src/lib.rs +++ b/crates/bevy_pbr/src/lib.rs @@ -1,5 +1,3 @@ -#![allow(clippy::type_complexity)] - pub mod wireframe; mod alpha; diff --git a/crates/bevy_ptr/Cargo.toml b/crates/bevy_ptr/Cargo.toml index f09f5f0d54..06c5bd688c 100644 --- a/crates/bevy_ptr/Cargo.toml +++ b/crates/bevy_ptr/Cargo.toml @@ -9,3 +9,6 @@ license = "MIT OR Apache-2.0" keywords = ["bevy", "no_std"] [dependencies] + +[lints] +workspace = true diff --git a/crates/bevy_ptr/src/lib.rs b/crates/bevy_ptr/src/lib.rs index f6212c505b..7a98d53b9f 100644 --- a/crates/bevy_ptr/src/lib.rs +++ b/crates/bevy_ptr/src/lib.rs @@ -1,7 +1,6 @@ #![doc = include_str!("../README.md")] #![no_std] #![warn(missing_docs)] -#![allow(clippy::type_complexity)] use core::fmt::{self, Formatter, Pointer}; use core::{ diff --git a/crates/bevy_reflect/Cargo.toml b/crates/bevy_reflect/Cargo.toml index ecf925cf01..80a85b8063 100644 --- a/crates/bevy_reflect/Cargo.toml +++ b/crates/bevy_reflect/Cargo.toml @@ -47,3 +47,6 @@ bincode = "1.3" name = "reflect_docs" path = "examples/reflect_docs.rs" required-features = ["documentation"] + +[lints] +workspace = true diff --git a/crates/bevy_reflect/bevy_reflect_derive/Cargo.toml b/crates/bevy_reflect/bevy_reflect_derive/Cargo.toml index 0950536e31..6caf9948a3 100644 --- a/crates/bevy_reflect/bevy_reflect_derive/Cargo.toml +++ b/crates/bevy_reflect/bevy_reflect_derive/Cargo.toml @@ -23,3 +23,6 @@ syn = { version = "2.0", features = ["full"] } proc-macro2 = "1.0" quote = "1.0" uuid = { version = "1.1", features = ["v4"] } + +[lints] +workspace = true diff --git a/crates/bevy_reflect/src/lib.rs b/crates/bevy_reflect/src/lib.rs index 1a02cf4ed8..84aae3675f 100644 --- a/crates/bevy_reflect/src/lib.rs +++ b/crates/bevy_reflect/src/lib.rs @@ -464,7 +464,6 @@ //! [orphan rule]: https://doc.rust-lang.org/book/ch10-02-traits.html#implementing-a-trait-on-a-type:~:text=But%20we%20can%E2%80%99t,implementation%20to%20use. //! [`bevy_reflect_derive/documentation`]: bevy_reflect_derive //! [derive `Reflect`]: derive@crate::Reflect -#![allow(clippy::type_complexity)] mod array; mod fields; diff --git a/crates/bevy_render/Cargo.toml b/crates/bevy_render/Cargo.toml index be65412bcb..caac932cf0 100644 --- a/crates/bevy_render/Cargo.toml +++ b/crates/bevy_render/Cargo.toml @@ -96,3 +96,6 @@ web-sys = { version = "0.3", features = [ 'Window', ] } wasm-bindgen = "0.2" + +[lints] +workspace = true diff --git a/crates/bevy_render/macros/Cargo.toml b/crates/bevy_render/macros/Cargo.toml index 6bd810a310..368077ef07 100644 --- a/crates/bevy_render/macros/Cargo.toml +++ b/crates/bevy_render/macros/Cargo.toml @@ -17,3 +17,6 @@ bevy_macro_utils = { path = "../../bevy_macro_utils", version = "0.12.0" } syn = "2.0" proc-macro2 = "1.0" quote = "1.0" + +[lints] +workspace = true diff --git a/crates/bevy_render/src/lib.rs b/crates/bevy_render/src/lib.rs index 4f06c11e02..cde3062c48 100644 --- a/crates/bevy_render/src/lib.rs +++ b/crates/bevy_render/src/lib.rs @@ -1,5 +1,3 @@ -#![allow(clippy::type_complexity)] - #[cfg(target_pointer_width = "16")] compile_error!("bevy_render cannot compile for a 16-bit platform."); diff --git a/crates/bevy_scene/Cargo.toml b/crates/bevy_scene/Cargo.toml index b9997dc9dd..9732d8c053 100644 --- a/crates/bevy_scene/Cargo.toml +++ b/crates/bevy_scene/Cargo.toml @@ -33,3 +33,6 @@ thiserror = "1.0" postcard = { version = "1.0", features = ["alloc"] } bincode = "1.3" rmp-serde = "1.1" + +[lints] +workspace = true diff --git a/crates/bevy_scene/src/lib.rs b/crates/bevy_scene/src/lib.rs index 5e6dceace5..cb4988c8be 100644 --- a/crates/bevy_scene/src/lib.rs +++ b/crates/bevy_scene/src/lib.rs @@ -4,7 +4,6 @@ //! instantiated or removed from a world to allow composition. Scenes can be serialized/deserialized, //! for example to save part of the world state to a file. -#![allow(clippy::type_complexity)] #![warn(missing_docs)] mod bundle; diff --git a/crates/bevy_sprite/Cargo.toml b/crates/bevy_sprite/Cargo.toml index 9b211f9d41..ec2081d05a 100644 --- a/crates/bevy_sprite/Cargo.toml +++ b/crates/bevy_sprite/Cargo.toml @@ -35,3 +35,6 @@ thiserror = "1.0" rectangle-pack = "0.4" bitflags = "2.3" radsort = "0.1" + +[lints] +workspace = true diff --git a/crates/bevy_sprite/src/lib.rs b/crates/bevy_sprite/src/lib.rs index 9f68a9a3b9..ce5b12e6a5 100644 --- a/crates/bevy_sprite/src/lib.rs +++ b/crates/bevy_sprite/src/lib.rs @@ -1,5 +1,3 @@ -#![allow(clippy::type_complexity)] - mod bundle; mod dynamic_texture_atlas_builder; mod mesh2d; diff --git a/crates/bevy_tasks/Cargo.toml b/crates/bevy_tasks/Cargo.toml index 6d52a0d4de..d208f92450 100644 --- a/crates/bevy_tasks/Cargo.toml +++ b/crates/bevy_tasks/Cargo.toml @@ -24,3 +24,6 @@ wasm-bindgen-futures = "0.4" [dev-dependencies] instant = { version = "0.1", features = ["wasm-bindgen"] } + +[lints] +workspace = true diff --git a/crates/bevy_tasks/src/lib.rs b/crates/bevy_tasks/src/lib.rs index 4d2786e41a..c1725d2b8b 100644 --- a/crates/bevy_tasks/src/lib.rs +++ b/crates/bevy_tasks/src/lib.rs @@ -1,5 +1,4 @@ #![warn(missing_docs)] -#![allow(clippy::type_complexity)] #![doc = include_str!("../README.md")] mod slice; diff --git a/crates/bevy_text/Cargo.toml b/crates/bevy_text/Cargo.toml index 1237443d78..8218b578fb 100644 --- a/crates/bevy_text/Cargo.toml +++ b/crates/bevy_text/Cargo.toml @@ -30,3 +30,6 @@ ab_glyph = "0.2.6" glyph_brush_layout = "0.2.1" thiserror = "1.0" serde = {version = "1", features = ["derive"]} + +[lints] +workspace = true diff --git a/crates/bevy_text/src/lib.rs b/crates/bevy_text/src/lib.rs index 6a1981fa61..bdbc1e1683 100644 --- a/crates/bevy_text/src/lib.rs +++ b/crates/bevy_text/src/lib.rs @@ -1,5 +1,3 @@ -#![allow(clippy::type_complexity)] - mod error; mod font; mod font_atlas; diff --git a/crates/bevy_time/Cargo.toml b/crates/bevy_time/Cargo.toml index b8a47ac969..9013a624af 100644 --- a/crates/bevy_time/Cargo.toml +++ b/crates/bevy_time/Cargo.toml @@ -24,3 +24,6 @@ bevy_utils = { path = "../bevy_utils", version = "0.12.0" } crossbeam-channel = "0.5.0" serde = { version = "1", features = ["derive"], optional = true } thiserror = "1.0" + +[lints] +workspace = true diff --git a/crates/bevy_time/src/lib.rs b/crates/bevy_time/src/lib.rs index d5611ec58e..2d47acf06b 100644 --- a/crates/bevy_time/src/lib.rs +++ b/crates/bevy_time/src/lib.rs @@ -1,4 +1,3 @@ -#![allow(clippy::type_complexity)] #![warn(missing_docs)] #![doc = include_str!("../README.md")] diff --git a/crates/bevy_transform/Cargo.toml b/crates/bevy_transform/Cargo.toml index 5ad19c096e..344e25b036 100644 --- a/crates/bevy_transform/Cargo.toml +++ b/crates/bevy_transform/Cargo.toml @@ -25,3 +25,6 @@ glam = { version = "0.24", features = ["approx"] } [features] serialize = ["dep:serde", "bevy_math/serialize"] + +[lints] +workspace = true diff --git a/crates/bevy_transform/src/lib.rs b/crates/bevy_transform/src/lib.rs index 5c176c4b8b..db7d1805a8 100644 --- a/crates/bevy_transform/src/lib.rs +++ b/crates/bevy_transform/src/lib.rs @@ -1,4 +1,3 @@ -#![allow(clippy::type_complexity)] #![warn(missing_docs)] #![warn(clippy::undocumented_unsafe_blocks)] #![doc = include_str!("../README.md")] diff --git a/crates/bevy_ui/Cargo.toml b/crates/bevy_ui/Cargo.toml index b6dd346f95..b92213b63e 100644 --- a/crates/bevy_ui/Cargo.toml +++ b/crates/bevy_ui/Cargo.toml @@ -36,3 +36,6 @@ serde = { version = "1", features = ["derive"] } smallvec = { version = "1.6", features = ["union", "const_generics"] } bytemuck = { version = "1.5", features = ["derive"] } thiserror = "1.0.0" + +[lints] +workspace = true diff --git a/crates/bevy_ui/src/lib.rs b/crates/bevy_ui/src/lib.rs index e72eb5ea77..f8b2597cc2 100644 --- a/crates/bevy_ui/src/lib.rs +++ b/crates/bevy_ui/src/lib.rs @@ -1,5 +1,3 @@ -#![allow(clippy::type_complexity)] - //! This crate contains Bevy's UI system, which can be used to create UI for both 2D and 3D games //! # Basic usage //! Spawn UI elements with [`node_bundles::ButtonBundle`], [`node_bundles::ImageBundle`], [`node_bundles::TextBundle`] and [`node_bundles::NodeBundle`] diff --git a/crates/bevy_utils/Cargo.toml b/crates/bevy_utils/Cargo.toml index 8e94bff4d8..bf1eea4b5f 100644 --- a/crates/bevy_utils/Cargo.toml +++ b/crates/bevy_utils/Cargo.toml @@ -24,3 +24,6 @@ nonmax = "0.5" [target.'cfg(target_arch = "wasm32")'.dependencies] getrandom = { version = "0.2.0", features = ["js"] } + +[lints] +workspace = true diff --git a/crates/bevy_utils/macros/Cargo.toml b/crates/bevy_utils/macros/Cargo.toml index 8a9cb4293f..fb65c66475 100644 --- a/crates/bevy_utils/macros/Cargo.toml +++ b/crates/bevy_utils/macros/Cargo.toml @@ -12,3 +12,6 @@ proc-macro = true syn = "2.0" quote = "1.0" proc-macro2 = "1.0" + +[lints] +workspace = true diff --git a/crates/bevy_utils/src/lib.rs b/crates/bevy_utils/src/lib.rs index fc0ec1c125..534edbd762 100644 --- a/crates/bevy_utils/src/lib.rs +++ b/crates/bevy_utils/src/lib.rs @@ -2,7 +2,7 @@ //! //! [Bevy]: https://bevyengine.org/ //! -#![allow(clippy::type_complexity)] + #![warn(missing_docs)] #![warn(clippy::undocumented_unsafe_blocks)] diff --git a/crates/bevy_window/Cargo.toml b/crates/bevy_window/Cargo.toml index 0f2af84389..5743d1ebf5 100644 --- a/crates/bevy_window/Cargo.toml +++ b/crates/bevy_window/Cargo.toml @@ -28,3 +28,6 @@ raw-window-handle = "0.5" # other serde = { version = "1.0", features = ["derive"], optional = true } + +[lints] +workspace = true diff --git a/crates/bevy_window/src/lib.rs b/crates/bevy_window/src/lib.rs index f1e8a304c5..3846814097 100644 --- a/crates/bevy_window/src/lib.rs +++ b/crates/bevy_window/src/lib.rs @@ -1,4 +1,3 @@ -#![allow(clippy::type_complexity)] #![warn(missing_docs)] //! `bevy_window` provides a platform-agnostic interface for windowing in Bevy. //! diff --git a/crates/bevy_winit/Cargo.toml b/crates/bevy_winit/Cargo.toml index 3e0df9e2b9..b3fc28ab47 100644 --- a/crates/bevy_winit/Cargo.toml +++ b/crates/bevy_winit/Cargo.toml @@ -45,3 +45,6 @@ crossbeam-channel = "0.5" [package.metadata.docs.rs] features = ["x11"] + +[lints] +workspace = true diff --git a/crates/bevy_winit/src/lib.rs b/crates/bevy_winit/src/lib.rs index 1241717bb5..7d531a281a 100644 --- a/crates/bevy_winit/src/lib.rs +++ b/crates/bevy_winit/src/lib.rs @@ -1,4 +1,3 @@ -#![allow(clippy::type_complexity)] #![warn(missing_docs)] //! `bevy_winit` provides utilities to handle window creation and the eventloop through [`winit`] //! diff --git a/examples/2d/mesh2d_manual.rs b/examples/2d/mesh2d_manual.rs index 3e908c49fe..a940ed142f 100644 --- a/examples/2d/mesh2d_manual.rs +++ b/examples/2d/mesh2d_manual.rs @@ -5,8 +5,6 @@ //! //! [`Material2d`]: bevy::sprite::Material2d -#![allow(clippy::type_complexity)] - use bevy::{ core_pipeline::core_2d::Transparent2d, prelude::*, diff --git a/examples/3d/anti_aliasing.rs b/examples/3d/anti_aliasing.rs index 255ccf00bd..df6d6d594e 100644 --- a/examples/3d/anti_aliasing.rs +++ b/examples/3d/anti_aliasing.rs @@ -1,9 +1,5 @@ //! This example compares MSAA (Multi-Sample Anti-aliasing), FXAA (Fast Approximate Anti-aliasing), and TAA (Temporal Anti-aliasing). -// This lint usually gives bad advice in the context of Bevy -- hiding complex queries behind -// type aliases tends to obfuscate code while offering no improvement in code cleanliness. -#![allow(clippy::type_complexity)] - use std::f32::consts::PI; use bevy::{ diff --git a/examples/3d/shadow_caster_receiver.rs b/examples/3d/shadow_caster_receiver.rs index e97d29fd09..922aa3b021 100644 --- a/examples/3d/shadow_caster_receiver.rs +++ b/examples/3d/shadow_caster_receiver.rs @@ -1,9 +1,5 @@ //! Demonstrates how to prevent meshes from casting/receiving shadows in a 3d scene. -// This lint usually gives bad advice in the context of Bevy -- hiding complex queries behind -// type aliases tends to obfuscate code while offering no improvement in code cleanliness. -#![allow(clippy::type_complexity)] - use std::f32::consts::PI; use bevy::{ diff --git a/examples/3d/ssao.rs b/examples/3d/ssao.rs index 9253c6afbb..db1adcb1d8 100644 --- a/examples/3d/ssao.rs +++ b/examples/3d/ssao.rs @@ -1,9 +1,5 @@ //! A scene showcasing screen space ambient occlusion. -// This lint usually gives bad advice in the context of Bevy -- hiding complex queries behind -// type aliases tends to obfuscate code while offering no improvement in code cleanliness. -#![allow(clippy::type_complexity)] - use bevy::{ core_pipeline::experimental::taa::{TemporalAntiAliasBundle, TemporalAntiAliasPlugin}, pbr::{ diff --git a/examples/3d/transmission.rs b/examples/3d/transmission.rs index 80400e6629..d2dd671943 100644 --- a/examples/3d/transmission.rs +++ b/examples/3d/transmission.rs @@ -18,10 +18,6 @@ //! | `D` | Toggle Depth Prepass | //! | `T` | Toggle TAA | -// This lint usually gives bad advice in the context of Bevy -- hiding complex queries behind -// type aliases tends to obfuscate code while offering no improvement in code cleanliness. -#![allow(clippy::type_complexity)] - use std::f32::consts::PI; use bevy::{ diff --git a/examples/ecs/custom_query_param.rs b/examples/ecs/custom_query_param.rs index 81a6d8cfa7..8cc5f17207 100644 --- a/examples/ecs/custom_query_param.rs +++ b/examples/ecs/custom_query_param.rs @@ -12,10 +12,6 @@ //! //! For more details on the `WorldQuery` derive macro, see the trait documentation. -// This lint usually gives bad advice in the context of Bevy -- hiding complex queries behind -// type aliases tends to obfuscate code while offering no improvement in code cleanliness. -#![allow(clippy::type_complexity)] - use bevy::{ecs::query::WorldQuery, prelude::*}; use std::fmt::Debug; diff --git a/examples/ecs/state.rs b/examples/ecs/state.rs index 5b220c7851..c4603196f4 100644 --- a/examples/ecs/state.rs +++ b/examples/ecs/state.rs @@ -5,10 +5,6 @@ //! //! In this case, we're transitioning from a `Menu` state to an `InGame` state. -// This lint usually gives bad advice in the context of Bevy -- hiding complex queries behind -// type aliases tends to obfuscate code while offering no improvement in code cleanliness. -#![allow(clippy::type_complexity)] - use bevy::prelude::*; fn main() { diff --git a/examples/games/alien_cake_addict.rs b/examples/games/alien_cake_addict.rs index f01769f2fc..12b2753229 100644 --- a/examples/games/alien_cake_addict.rs +++ b/examples/games/alien_cake_addict.rs @@ -1,9 +1,5 @@ //! Eat the cakes. Eat them all. An example 3D game. -// This lint usually gives bad advice in the context of Bevy -- hiding complex queries behind -// type aliases tends to obfuscate code while offering no improvement in code cleanliness. -#![allow(clippy::type_complexity)] - use std::f32::consts::PI; use bevy::prelude::*; diff --git a/examples/games/game_menu.rs b/examples/games/game_menu.rs index 226317685c..5b4b5a2457 100644 --- a/examples/games/game_menu.rs +++ b/examples/games/game_menu.rs @@ -2,10 +2,6 @@ //! change some settings or quit. There is no actual game, it will just display the current //! settings for 5 seconds before going back to the menu. -// This lint usually gives bad advice in the context of Bevy -- hiding complex queries behind -// type aliases tends to obfuscate code while offering no improvement in code cleanliness. -#![allow(clippy::type_complexity)] - use bevy::prelude::*; const TEXT_COLOR: Color = Color::rgb(0.9, 0.9, 0.9); diff --git a/examples/input/text_input.rs b/examples/input/text_input.rs index b6e9ad5b04..a0b301b329 100644 --- a/examples/input/text_input.rs +++ b/examples/input/text_input.rs @@ -4,10 +4,6 @@ //! Clicking toggle IME (Input Method Editor) support, but the font used as limited support of characters. //! You should change the provided font with another one to test other languages input. -// This lint usually gives bad advice in the context of Bevy -- hiding complex queries behind -// type aliases tends to obfuscate code while offering no improvement in code cleanliness. -#![allow(clippy::type_complexity)] - use bevy::{input::keyboard::KeyboardInput, prelude::*}; fn main() { diff --git a/examples/mobile/Cargo.toml b/examples/mobile/Cargo.toml index 02c7d3f8a3..194970d072 100644 --- a/examples/mobile/Cargo.toml +++ b/examples/mobile/Cargo.toml @@ -29,3 +29,5 @@ target_sdk_version = 31 icon = "@mipmap/ic_launcher" label = "Bevy Example" +[lints] +workspace = true diff --git a/examples/mobile/src/lib.rs b/examples/mobile/src/lib.rs index a4715c4368..7d36803928 100644 --- a/examples/mobile/src/lib.rs +++ b/examples/mobile/src/lib.rs @@ -1,7 +1,3 @@ -// This lint usually gives bad advice in the context of Bevy -- hiding complex queries behind -// type aliases tends to obfuscate code while offering no improvement in code cleanliness. -#![allow(clippy::type_complexity)] - use bevy::{ input::touch::TouchPhase, prelude::*, diff --git a/examples/tools/scene_viewer/scene_viewer_plugin.rs b/examples/tools/scene_viewer/scene_viewer_plugin.rs index 3a41efe069..3dd6b1273c 100644 --- a/examples/tools/scene_viewer/scene_viewer_plugin.rs +++ b/examples/tools/scene_viewer/scene_viewer_plugin.rs @@ -3,10 +3,6 @@ //! - Copy the code for the `SceneViewerPlugin` and add the plugin to your App. //! - Insert an initialized `SceneHandle` resource into your App's `AssetServer`. -// This lint usually gives bad advice in the context of Bevy -- hiding complex queries behind -// type aliases tends to obfuscate code while offering no improvement in code cleanliness. -#![allow(clippy::type_complexity)] - use bevy::{ asset::LoadState, gltf::Gltf, input::common_conditions::input_just_pressed, prelude::*, scene::InstanceId, diff --git a/examples/ui/button.rs b/examples/ui/button.rs index 5e37068572..27ab4a19a1 100644 --- a/examples/ui/button.rs +++ b/examples/ui/button.rs @@ -1,10 +1,6 @@ //! This example illustrates how to create a button that changes color and text based on its //! interaction state. -// This lint usually gives bad advice in the context of Bevy -- hiding complex queries behind -// type aliases tends to obfuscate code while offering no improvement in code cleanliness. -#![allow(clippy::type_complexity)] - use bevy::{prelude::*, winit::WinitSettings}; fn main() {