Allow clippy::too_many_arguments
to lint without warnings (#17249)
# Objective Many instances of `clippy::too_many_arguments` linting happen to be on systems - functions which we don't call manually, and thus there's not much reason to worry about the argument count. ## Solution Allow `clippy::too_many_arguments` globally, and remove all lint attributes related to it.
This commit is contained in:
parent
7b56a1aa98
commit
3742e621ef
@ -41,6 +41,7 @@ type_complexity = "allow"
|
||||
undocumented_unsafe_blocks = "warn"
|
||||
unwrap_or_default = "warn"
|
||||
needless_lifetimes = "allow"
|
||||
too_many_arguments = "allow"
|
||||
|
||||
ptr_as_ptr = "warn"
|
||||
ptr_cast_constness = "warn"
|
||||
@ -82,6 +83,7 @@ type_complexity = "allow"
|
||||
undocumented_unsafe_blocks = "warn"
|
||||
unwrap_or_default = "warn"
|
||||
needless_lifetimes = "allow"
|
||||
too_many_arguments = "allow"
|
||||
|
||||
ptr_as_ptr = "warn"
|
||||
ptr_cast_constness = "warn"
|
||||
|
@ -47,6 +47,7 @@ type_complexity = "allow"
|
||||
undocumented_unsafe_blocks = "warn"
|
||||
unwrap_or_default = "warn"
|
||||
needless_lifetimes = "allow"
|
||||
too_many_arguments = "allow"
|
||||
|
||||
ptr_as_ptr = "warn"
|
||||
ptr_cast_constness = "warn"
|
||||
|
@ -102,7 +102,6 @@ fn simple<T: std::ops::Add<Output = T>>(a: T, b: T) -> T {
|
||||
a + b
|
||||
}
|
||||
|
||||
#[expect(clippy::too_many_arguments)]
|
||||
fn complex<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9>(
|
||||
_: T0,
|
||||
_: T1,
|
||||
|
@ -113,10 +113,6 @@ impl AssetInfos {
|
||||
.unwrap()
|
||||
}
|
||||
|
||||
#[expect(
|
||||
clippy::too_many_arguments,
|
||||
reason = "Arguments needed so that both `create_loading_handle_untyped()` and `get_or_create_path_handle_internal()` may share code."
|
||||
)]
|
||||
fn create_handle_internal(
|
||||
infos: &mut HashMap<UntypedAssetId, AssetInfo>,
|
||||
handle_providers: &TypeIdMap<AssetHandleProvider>,
|
||||
|
@ -609,7 +609,6 @@ pub fn extract_core_3d_camera_phases(
|
||||
|
||||
// Extract the render phases for the prepass
|
||||
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn extract_camera_prepass_phase(
|
||||
mut commands: Commands,
|
||||
mut opaque_3d_prepass_phases: ResMut<ViewBinnedRenderPhases<Opaque3dPrepass>>,
|
||||
@ -689,7 +688,6 @@ pub fn extract_camera_prepass_phase(
|
||||
alpha_mask_3d_deferred_phases.retain(|entity, _| live_entities.contains(entity));
|
||||
}
|
||||
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn prepare_core_3d_depth_textures(
|
||||
mut commands: Commands,
|
||||
mut texture_cache: ResMut<TextureCache>,
|
||||
@ -780,7 +778,6 @@ pub struct ViewTransmissionTexture {
|
||||
pub sampler: Sampler,
|
||||
}
|
||||
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn prepare_core_3d_transmission_textures(
|
||||
mut commands: Commands,
|
||||
mut texture_cache: ResMut<TextureCache>,
|
||||
@ -880,7 +877,6 @@ pub fn check_msaa(mut deferred_views: Query<&mut Msaa, (With<Camera>, With<Defer
|
||||
}
|
||||
|
||||
// Prepares the textures used by the prepass
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn prepare_prepass_textures(
|
||||
mut commands: Commands,
|
||||
mut texture_cache: ResMut<TextureCache>,
|
||||
|
@ -124,7 +124,6 @@ pub struct OitResolvePipelineKey {
|
||||
layer_count: i32,
|
||||
}
|
||||
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn queue_oit_resolve_pipeline(
|
||||
mut commands: Commands,
|
||||
pipeline_cache: Res<PipelineCache>,
|
||||
|
@ -911,7 +911,6 @@ impl ViewNode for SmaaNode {
|
||||
/// writes to the two-channel RG edges texture. Additionally, it ensures that
|
||||
/// all pixels it didn't touch are stenciled out so that phase 2 won't have to
|
||||
/// examine them.
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
fn perform_edge_detection(
|
||||
render_context: &mut RenderContext,
|
||||
smaa_pipelines: &SmaaPipelines,
|
||||
@ -965,7 +964,6 @@ fn perform_edge_detection(
|
||||
/// This runs as part of the [`SmaaNode`]. It reads the edges texture and writes
|
||||
/// to the blend weight texture, using the stencil buffer to avoid processing
|
||||
/// pixels it doesn't need to examine.
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
fn perform_blending_weight_calculation(
|
||||
render_context: &mut RenderContext,
|
||||
smaa_pipelines: &SmaaPipelines,
|
||||
@ -1024,7 +1022,6 @@ fn perform_blending_weight_calculation(
|
||||
///
|
||||
/// This runs as part of the [`SmaaNode`]. It reads from the blend weight
|
||||
/// texture. It's the only phase that writes to the postprocessing destination.
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
fn perform_neighborhood_blending(
|
||||
render_context: &mut RenderContext,
|
||||
smaa_pipelines: &SmaaPipelines,
|
||||
|
@ -2,10 +2,6 @@ use proc_macro2::Ident;
|
||||
use quote::quote;
|
||||
use syn::{Attribute, Fields, ImplGenerics, TypeGenerics, Visibility, WhereClause};
|
||||
|
||||
#[expect(
|
||||
clippy::too_many_arguments,
|
||||
reason = "Required to generate the entire item structure."
|
||||
)]
|
||||
pub(crate) fn item_struct(
|
||||
path: &syn::Path,
|
||||
fields: &Fields,
|
||||
@ -55,10 +51,6 @@ pub(crate) fn item_struct(
|
||||
}
|
||||
}
|
||||
|
||||
#[expect(
|
||||
clippy::too_many_arguments,
|
||||
reason = "Required to generate the entire world query implementation."
|
||||
)]
|
||||
pub(crate) fn world_query_impl(
|
||||
path: &syn::Path,
|
||||
struct_name: &Ident,
|
||||
|
@ -504,7 +504,6 @@ impl BundleInfo {
|
||||
/// `table` must be the "new" table for `entity`. `table_row` must have space allocated for the
|
||||
/// `entity`, `bundle` must match this [`BundleInfo`]'s type
|
||||
#[inline]
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
unsafe fn write_components<'a, T: DynamicBundle, S: BundleComponentStatus>(
|
||||
&self,
|
||||
table: &mut Table,
|
||||
@ -594,7 +593,6 @@ impl BundleInfo {
|
||||
/// This method _should not_ be called outside of [`BundleInfo::write_components`].
|
||||
/// For more information, read the [`BundleInfo::write_components`] safety docs.
|
||||
/// This function inherits the safety requirements defined there.
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub(crate) unsafe fn initialize_required_component(
|
||||
table: &mut Table,
|
||||
sparse_sets: &mut SparseSets,
|
||||
|
@ -236,7 +236,6 @@ macro_rules! impl_exclusive_system_function {
|
||||
// Yes, this is strange, but `rustc` fails to compile this impl
|
||||
// without using this function. It fails to recognize that `func`
|
||||
// is a function, potentially because of the multiple impls of `FnMut`
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
fn call_inner<Out, $($param,)*>(
|
||||
mut f: impl FnMut(&mut World, $($param,)*) -> Out,
|
||||
world: &mut World,
|
||||
@ -267,7 +266,6 @@ macro_rules! impl_exclusive_system_function {
|
||||
// Yes, this is strange, but `rustc` fails to compile this impl
|
||||
// without using this function. It fails to recognize that `func`
|
||||
// is a function, potentially because of the multiple impls of `FnMut`
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
fn call_inner<In: SystemInput, Out, $($param,)*>(
|
||||
mut f: impl FnMut(In::Param<'_>, &mut World, $($param,)*) -> Out,
|
||||
input: In::Inner<'_>,
|
||||
|
@ -1029,7 +1029,6 @@ macro_rules! impl_system_function {
|
||||
// Yes, this is strange, but `rustc` fails to compile this impl
|
||||
// without using this function. It fails to recognize that `func`
|
||||
// is a function, potentially because of the multiple impls of `FnMut`
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
fn call_inner<Out, $($param,)*>(
|
||||
mut f: impl FnMut($($param,)*)->Out,
|
||||
$($param: $param,)*
|
||||
@ -1056,7 +1055,6 @@ macro_rules! impl_system_function {
|
||||
type Param = ($($param,)*);
|
||||
#[inline]
|
||||
fn run(&mut self, input: In::Inner<'_>, param_value: SystemParamItem< ($($param,)*)>) -> Out {
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
fn call_inner<In: SystemInput, Out, $($param,)*>(
|
||||
mut f: impl FnMut(In::Param<'_>, $($param,)*)->Out,
|
||||
input: In::Inner<'_>,
|
||||
|
@ -1111,7 +1111,6 @@ mod tests {
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
fn can_have_16_parameters() {
|
||||
fn sys_x(
|
||||
_: Res<A>,
|
||||
|
@ -1746,7 +1746,6 @@ impl<'w> EntityWorldMut<'w> {
|
||||
/// when DROP is true removed components will be dropped otherwise they will be forgotten
|
||||
// We use a const generic here so that we are less reliant on
|
||||
// inlining for rustc to optimize out the `match DROP`
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
unsafe fn move_entity_from_remove<const DROP: bool>(
|
||||
entity: Entity,
|
||||
self_location: &mut EntityLocation,
|
||||
@ -1826,7 +1825,6 @@ impl<'w> EntityWorldMut<'w> {
|
||||
///
|
||||
/// # Safety
|
||||
/// - A `BundleInfo` with the corresponding `BundleId` must have been initialized.
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
unsafe fn remove_bundle(&mut self, bundle: BundleId) -> EntityLocation {
|
||||
let entity = self.entity;
|
||||
let world = &mut self.world;
|
||||
|
@ -347,7 +347,6 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
fn draw_grid<Config, Clear>(
|
||||
gizmos: &mut GizmoBuffer<Config, Clear>,
|
||||
isometry: Isometry3d,
|
||||
|
@ -288,7 +288,6 @@ type DrawLineJointGizmo2d = (
|
||||
DrawLineJointGizmo,
|
||||
);
|
||||
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
fn queue_line_gizmos_2d(
|
||||
draw_functions: Res<DrawFunctions<Transparent2d>>,
|
||||
pipeline: Res<LineGizmoPipeline>,
|
||||
@ -365,8 +364,6 @@ fn queue_line_gizmos_2d(
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
fn queue_line_joint_gizmos_2d(
|
||||
draw_functions: Res<DrawFunctions<Transparent2d>>,
|
||||
pipeline: Res<LineJointGizmoPipeline>,
|
||||
|
@ -283,7 +283,6 @@ type DrawLineJointGizmo3d = (
|
||||
DrawLineJointGizmo,
|
||||
);
|
||||
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
fn queue_line_gizmos_3d(
|
||||
draw_functions: Res<DrawFunctions<Transparent3d>>,
|
||||
pipeline: Res<LineGizmoPipeline>,
|
||||
@ -398,7 +397,6 @@ fn queue_line_gizmos_3d(
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
fn queue_line_joint_gizmos_3d(
|
||||
draw_functions: Res<DrawFunctions<Transparent3d>>,
|
||||
pipeline: Res<LineJointGizmoPipeline>,
|
||||
|
@ -1368,7 +1368,7 @@ fn warn_on_differing_texture_transforms(
|
||||
}
|
||||
|
||||
/// Loads a glTF node.
|
||||
#[allow(clippy::too_many_arguments, clippy::result_large_err)]
|
||||
#[allow(clippy::result_large_err)]
|
||||
fn load_node(
|
||||
gltf_node: &Node,
|
||||
world_builder: &mut WorldChildBuilder,
|
||||
|
@ -135,7 +135,6 @@ impl ClusterableObjectType {
|
||||
}
|
||||
|
||||
// NOTE: Run this before update_point_light_frusta!
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub(crate) fn assign_objects_to_clusters(
|
||||
mut commands: Commands,
|
||||
mut global_clusterable_objects: ResMut<GlobalVisibleClusterableObjects>,
|
||||
@ -842,7 +841,6 @@ pub(crate) fn assign_objects_to_clusters(
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
fn compute_aabb_for_cluster(
|
||||
z_near: f32,
|
||||
z_far: f32,
|
||||
|
@ -824,7 +824,6 @@ pub fn check_dir_light_mesh_visibility(
|
||||
});
|
||||
}
|
||||
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn check_point_light_mesh_visibility(
|
||||
visible_point_lights: Query<&VisibleClusterableObjects>,
|
||||
mut point_lights: Query<(
|
||||
|
@ -610,7 +610,6 @@ pub fn extract_mesh_materials<M: Material>(
|
||||
|
||||
/// For each view, iterates over all the meshes visible from that view and adds
|
||||
/// them to [`BinnedRenderPhase`]s or [`SortedRenderPhase`]s as appropriate.
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn queue_material_meshes<M: Material>(
|
||||
(
|
||||
opaque_draw_functions,
|
||||
|
@ -601,7 +601,6 @@ fn split_simplified_group_into_new_meshlets(
|
||||
new_meshlets_count
|
||||
}
|
||||
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
fn build_and_compress_per_meshlet_vertex_data(
|
||||
meshlet: &meshopt_Meshlet,
|
||||
meshlet_vertex_ids: &[u32],
|
||||
|
@ -81,7 +81,6 @@ impl InstanceManager {
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn add_instance(
|
||||
&mut self,
|
||||
instance: MainEntity,
|
||||
|
@ -29,7 +29,6 @@ pub struct MeshletViewMaterialsMainOpaquePass(pub Vec<(u32, CachedRenderPipeline
|
||||
|
||||
/// Prepare [`Material`] pipelines for [`super::MeshletMesh`] entities for use in [`super::MeshletMainOpaquePass3dNode`],
|
||||
/// and register the material with [`InstanceManager`].
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn prepare_material_meshlet_meshes_main_opaque_pass<M: Material>(
|
||||
resource_manager: ResMut<ResourceManager>,
|
||||
mut instance_manager: ResMut<InstanceManager>,
|
||||
@ -247,7 +246,6 @@ pub struct MeshletViewMaterialsDeferredGBufferPrepass(
|
||||
|
||||
/// Prepare [`Material`] pipelines for [`super::MeshletMesh`] entities for use in [`super::MeshletPrepassNode`],
|
||||
/// and [`super::MeshletDeferredGBufferPrepassNode`] and register the material with [`InstanceManager`].
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn prepare_material_meshlet_meshes_prepass<M: Material>(
|
||||
resource_manager: ResMut<ResourceManager>,
|
||||
mut instance_manager: ResMut<InstanceManager>,
|
||||
|
@ -574,7 +574,6 @@ pub fn prepare_meshlet_per_frame_resources(
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn prepare_meshlet_view_bind_groups(
|
||||
meshlet_mesh_manager: Res<MeshletMeshManager>,
|
||||
resource_manager: Res<ResourceManager>,
|
||||
|
@ -358,7 +358,6 @@ fn fill_cluster_buffers_pass(
|
||||
);
|
||||
}
|
||||
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
fn cull_pass(
|
||||
label: &'static str,
|
||||
render_context: &mut RenderContext,
|
||||
@ -405,7 +404,6 @@ fn cull_pass(
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
fn raster_pass(
|
||||
first_pass: bool,
|
||||
render_context: &mut RenderContext,
|
||||
|
@ -755,7 +755,6 @@ pub fn prepare_prepass_view_bind_group<M: Material>(
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn queue_prepass_material_meshes<M: Material>(
|
||||
(
|
||||
opaque_draw_functions,
|
||||
|
@ -206,7 +206,6 @@ impl FromWorld for ShadowSamplers {
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn extract_lights(
|
||||
mut commands: Commands,
|
||||
point_light_shadow_map: Extract<Res<PointLightShadowMap>>,
|
||||
@ -684,7 +683,6 @@ pub(crate) fn spot_light_clip_from_view(angle: f32, near_z: f32) -> Mat4 {
|
||||
Mat4::perspective_infinite_reverse_rh(angle * 2.0, 1.0, near_z)
|
||||
}
|
||||
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn prepare_lights(
|
||||
mut commands: Commands,
|
||||
mut texture_cache: ResMut<TextureCache>,
|
||||
@ -1532,7 +1530,6 @@ fn despawn_entities(commands: &mut Commands, entities: Vec<Entity>) {
|
||||
/// For each shadow cascade, iterates over all the meshes "visible" from it and
|
||||
/// adds them to [`BinnedRenderPhase`]s or [`SortedRenderPhase`]s as
|
||||
/// appropriate.
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn queue_shadows<M: Material>(
|
||||
shadow_draw_functions: Res<DrawFunctions<Shadow>>,
|
||||
prepass_pipeline: Res<PrepassPipeline<M>>,
|
||||
|
@ -896,7 +896,6 @@ impl RenderMeshInstanceGpuQueue {
|
||||
impl RenderMeshInstanceGpuBuilder {
|
||||
/// Flushes this mesh instance to the [`RenderMeshInstanceGpu`] and
|
||||
/// [`MeshInputUniform`] tables, replacing the existing entry if applicable.
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
fn update(
|
||||
mut self,
|
||||
entity: MainEntity,
|
||||
@ -1170,7 +1169,6 @@ pub fn extract_meshes_for_cpu_building(
|
||||
///
|
||||
/// This is the variant of the system that runs when we're using GPU
|
||||
/// [`MeshUniform`] building.
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn extract_meshes_for_gpu_building(
|
||||
mut render_mesh_instances: ResMut<RenderMeshInstances>,
|
||||
render_visibility_ranges: Res<RenderVisibilityRanges>,
|
||||
@ -1351,7 +1349,6 @@ fn set_mesh_motion_vector_flags(
|
||||
|
||||
/// Creates the [`RenderMeshInstanceGpu`]s and [`MeshInputUniform`]s when GPU
|
||||
/// mesh uniforms are built.
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn collect_meshes_for_gpu_building(
|
||||
render_mesh_instances: ResMut<RenderMeshInstances>,
|
||||
batched_instance_buffers: ResMut<
|
||||
@ -2411,7 +2408,6 @@ impl MeshBindGroupPair {
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn prepare_mesh_bind_group(
|
||||
meshes: Res<RenderAssets<RenderMesh>>,
|
||||
mut groups: ResMut<MeshBindGroups>,
|
||||
|
@ -495,7 +495,6 @@ impl MeshLayouts {
|
||||
}
|
||||
|
||||
/// Creates the bind group for meshes with skins and morph targets.
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn morphed_skinned(
|
||||
&self,
|
||||
render_device: &RenderDevice,
|
||||
@ -523,7 +522,6 @@ impl MeshLayouts {
|
||||
/// [`MeshLayouts::morphed_motion`] above for more information about the
|
||||
/// `current_skin`, `prev_skin`, `current_weights`, and `prev_weights`
|
||||
/// buffers.
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn morphed_skinned_motion(
|
||||
&self,
|
||||
render_device: &RenderDevice,
|
||||
|
@ -488,7 +488,6 @@ pub struct MeshViewBindGroup {
|
||||
pub value: BindGroup,
|
||||
}
|
||||
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn prepare_mesh_view_bind_groups(
|
||||
mut commands: Commands,
|
||||
render_device: Res<RenderDevice>,
|
||||
|
@ -607,7 +607,6 @@ impl SpecializedRenderPipeline for VolumetricFogPipeline {
|
||||
}
|
||||
|
||||
/// Specializes volumetric fog pipelines for all views with that effect enabled.
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn prepare_volumetric_fog_pipelines(
|
||||
mut commands: Commands,
|
||||
pipeline_cache: Res<PipelineCache>,
|
||||
|
@ -402,7 +402,6 @@ pub struct PickingEventWriters<'w> {
|
||||
/// determined only by the pointer's *final position*. Since the hover state
|
||||
/// ultimately determines which entities receive events, this may mean that an
|
||||
/// entity can receive events from before or after it was actually hovered.
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn pointer_events(
|
||||
// Input
|
||||
mut input_events: EventReader<PointerInput>,
|
||||
|
@ -68,7 +68,6 @@ impl Plugin for MeshPickingPlugin {
|
||||
}
|
||||
|
||||
/// Casts rays into the scene using [`MeshPickingSettings`] and sends [`PointerHits`] events.
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn update_hits(
|
||||
backend_settings: Res<MeshPickingSettings>,
|
||||
ray_map: Res<RayMap>,
|
||||
|
@ -897,10 +897,6 @@ impl NormalizedRenderTarget {
|
||||
///
|
||||
/// [`OrthographicProjection`]: crate::camera::OrthographicProjection
|
||||
/// [`PerspectiveProjection`]: crate::camera::PerspectiveProjection
|
||||
#[expect(
|
||||
clippy::too_many_arguments,
|
||||
reason = "Could be rewritten with less arguments using a QueryData-implementing struct, but doesn't need to be."
|
||||
)]
|
||||
pub fn camera_system(
|
||||
mut window_resized_events: EventReader<WindowResized>,
|
||||
mut window_created_events: EventReader<WindowCreated>,
|
||||
|
@ -526,10 +526,6 @@ impl MeshAllocator {
|
||||
}
|
||||
|
||||
/// A generic function that copies either vertex or index data into a slab.
|
||||
#[expect(
|
||||
clippy::too_many_arguments,
|
||||
reason = "Used in systems to reduce the amount of code duplication"
|
||||
)]
|
||||
fn copy_element_data(
|
||||
&mut self,
|
||||
mesh_id: &AssetId<Mesh>,
|
||||
|
@ -251,10 +251,6 @@ fn extract_screenshots(
|
||||
system_state.apply(&mut main_world);
|
||||
}
|
||||
|
||||
#[expect(
|
||||
clippy::too_many_arguments,
|
||||
reason = "Could be rewritten with less arguments using a QueryData-implementing struct, but doesn't need to be."
|
||||
)]
|
||||
fn prepare_screenshots(
|
||||
targets: Res<RenderScreenshotTargets>,
|
||||
mut prepared: ResMut<RenderScreenshotsPrepared>,
|
||||
@ -579,10 +575,6 @@ pub(crate) fn submit_screenshot_commands(world: &World, encoder: &mut CommandEnc
|
||||
}
|
||||
}
|
||||
|
||||
#[expect(
|
||||
clippy::too_many_arguments,
|
||||
reason = "Used in systems to reduce the amount of code duplication"
|
||||
)]
|
||||
fn render_screenshot(
|
||||
encoder: &mut CommandEncoder,
|
||||
prepared: &RenderScreenshotsPrepared,
|
||||
|
@ -467,10 +467,6 @@ pub const fn tonemapping_pipeline_key(tonemapping: Tonemapping) -> Mesh2dPipelin
|
||||
}
|
||||
}
|
||||
|
||||
#[expect(
|
||||
clippy::too_many_arguments,
|
||||
reason = "Could be rewritten with less arguments using a QueryData-implementing struct, but doesn't need to be."
|
||||
)]
|
||||
pub fn queue_material2d_meshes<M: Material2d>(
|
||||
opaque_draw_functions: Res<DrawFunctions<Opaque2d>>,
|
||||
alpha_mask_draw_functions: Res<DrawFunctions<AlphaMask2d>>,
|
||||
|
@ -717,10 +717,6 @@ pub struct Mesh2dViewBindGroup {
|
||||
pub value: BindGroup,
|
||||
}
|
||||
|
||||
#[expect(
|
||||
clippy::too_many_arguments,
|
||||
reason = "Could be rewritten with less arguments using a QueryData-implementing struct, but doesn't need to be."
|
||||
)]
|
||||
pub fn prepare_mesh2d_view_bind_groups(
|
||||
mut commands: Commands,
|
||||
render_device: Res<RenderDevice>,
|
||||
|
@ -54,10 +54,6 @@ impl Plugin for SpritePickingPlugin {
|
||||
}
|
||||
}
|
||||
|
||||
#[expect(
|
||||
clippy::too_many_arguments,
|
||||
reason = "Could be rewritten with less arguments using a QueryData-implementing struct, but doesn't need to be."
|
||||
)]
|
||||
fn sprite_picking(
|
||||
pointers: Query<(&PointerId, &PointerLocation)>,
|
||||
cameras: Query<(Entity, &Camera, &GlobalTransform, &Projection)>,
|
||||
|
@ -492,10 +492,6 @@ pub struct ImageBindGroups {
|
||||
values: HashMap<AssetId<Image>, BindGroup>,
|
||||
}
|
||||
|
||||
#[expect(
|
||||
clippy::too_many_arguments,
|
||||
reason = "Could be rewritten with less arguments using a QueryData-implementing struct, but doesn't need to be."
|
||||
)]
|
||||
pub fn queue_sprites(
|
||||
mut view_entities: Local<FixedBitSet>,
|
||||
draw_functions: Res<DrawFunctions<Transparent2d>>,
|
||||
@ -583,10 +579,6 @@ pub fn queue_sprites(
|
||||
}
|
||||
}
|
||||
|
||||
#[expect(
|
||||
clippy::too_many_arguments,
|
||||
reason = "Could be rewritten with less arguments using a QueryData-implementing struct, but doesn't need to be."
|
||||
)]
|
||||
pub fn prepare_sprite_view_bind_groups(
|
||||
mut commands: Commands,
|
||||
render_device: Res<RenderDevice>,
|
||||
@ -620,10 +612,6 @@ pub fn prepare_sprite_view_bind_groups(
|
||||
}
|
||||
}
|
||||
|
||||
#[expect(
|
||||
clippy::too_many_arguments,
|
||||
reason = "Could be rewritten with less arguments using a QueryData-implementing struct, but doesn't need to be."
|
||||
)]
|
||||
pub fn prepare_sprite_image_bind_groups(
|
||||
mut commands: Commands,
|
||||
mut previous_len: Local<usize>,
|
||||
|
@ -80,7 +80,6 @@ impl TextPipeline {
|
||||
/// Utilizes [`cosmic_text::Buffer`] to shape and layout text
|
||||
///
|
||||
/// Negative or 0.0 font sizes will not be laid out.
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn update_buffer<'a>(
|
||||
&mut self,
|
||||
fonts: &Assets<Font>,
|
||||
@ -207,7 +206,6 @@ impl TextPipeline {
|
||||
///
|
||||
/// Produces a [`TextLayoutInfo`], containing [`PositionedGlyph`]s
|
||||
/// which contain information for rendering the text.
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn queue_text<'a>(
|
||||
&mut self,
|
||||
layout_info: &mut TextLayoutInfo,
|
||||
@ -341,7 +339,6 @@ impl TextPipeline {
|
||||
///
|
||||
/// Produces a [`TextMeasureInfo`] which can be used by a layout system
|
||||
/// to measure the text area on demand.
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn create_text_measure<'a>(
|
||||
&mut self,
|
||||
entity: Entity,
|
||||
|
@ -221,7 +221,6 @@ pub fn extract_text2d_sprite(
|
||||
///
|
||||
/// [`ResMut<Assets<Image>>`](Assets<Image>) -- This system only adds new [`Image`] assets.
|
||||
/// It does not modify or observe existing ones.
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn update_text2d_layout(
|
||||
mut last_scale_factor: Local<f32>,
|
||||
// Text items which should be reprocessed again, generally when the font hasn't loaded yet.
|
||||
|
@ -147,10 +147,6 @@ pub struct NodeQuery {
|
||||
/// The system that sets Interaction for all UI elements based on the mouse cursor activity
|
||||
///
|
||||
/// Entities with a hidden [`ViewVisibility`] are always treated as released.
|
||||
#[expect(
|
||||
clippy::too_many_arguments,
|
||||
reason = "Could be rewritten with less arguments using a QueryData-implementing struct, but doesn't need to be."
|
||||
)]
|
||||
pub fn ui_focus_system(
|
||||
mut state: Local<State>,
|
||||
camera_query: Query<(Entity, &Camera)>,
|
||||
|
@ -96,10 +96,6 @@ struct CameraLayoutInfo {
|
||||
}
|
||||
|
||||
/// Updates the UI's layout tree, computes the new layout geometry and then updates the sizes and transforms of all the UI nodes.
|
||||
#[expect(
|
||||
clippy::too_many_arguments,
|
||||
reason = "Could be rewritten with less arguments using a QueryData-implementing struct, but doesn't need to be."
|
||||
)]
|
||||
pub fn ui_layout_system(
|
||||
mut commands: Commands,
|
||||
mut buffers: Local<UiLayoutSystemBuffers>,
|
||||
|
@ -380,10 +380,6 @@ pub fn queue_shadows(
|
||||
}
|
||||
}
|
||||
|
||||
#[expect(
|
||||
clippy::too_many_arguments,
|
||||
reason = "Could be rewritten with less arguments using a QueryData-implementing struct, but doesn't need to be."
|
||||
)]
|
||||
pub fn prepare_shadows(
|
||||
mut commands: Commands,
|
||||
render_device: Res<RenderDevice>,
|
||||
|
@ -835,10 +835,6 @@ pub struct ImageNodeBindGroups {
|
||||
pub values: HashMap<AssetId<Image>, BindGroup>,
|
||||
}
|
||||
|
||||
#[expect(
|
||||
clippy::too_many_arguments,
|
||||
reason = "Could be rewritten with less arguments using a QueryData-implementing struct, but doesn't need to be."
|
||||
)]
|
||||
pub fn prepare_uinodes(
|
||||
mut commands: Commands,
|
||||
render_device: Res<RenderDevice>,
|
||||
|
@ -424,10 +424,6 @@ pub fn extract_ui_material_nodes<M: UiMaterial>(
|
||||
}
|
||||
}
|
||||
|
||||
#[expect(
|
||||
clippy::too_many_arguments,
|
||||
reason = "Could be rewritten with less arguments using a QueryData-implementing struct, but doesn't need to be."
|
||||
)]
|
||||
pub fn prepare_uimaterial_nodes<M: UiMaterial>(
|
||||
mut commands: Commands,
|
||||
render_device: Res<RenderDevice>,
|
||||
@ -608,10 +604,6 @@ impl<M: UiMaterial> RenderAsset for PreparedUiMaterial<M> {
|
||||
}
|
||||
}
|
||||
|
||||
#[expect(
|
||||
clippy::too_many_arguments,
|
||||
reason = "Could be rewritten with less arguments using a QueryData-implementing struct, but doesn't need to be."
|
||||
)]
|
||||
pub fn queue_ui_material_nodes<M: UiMaterial>(
|
||||
extracted_uinodes: Res<ExtractedUiMaterialNodes<M>>,
|
||||
draw_functions: Res<DrawFunctions<TransparentUi>>,
|
||||
|
@ -377,10 +377,6 @@ pub fn queue_ui_slices(
|
||||
}
|
||||
}
|
||||
|
||||
#[expect(
|
||||
clippy::too_many_arguments,
|
||||
reason = "Could be rewritten with less arguments using a QueryData-implementing struct, but doesn't need to be."
|
||||
)]
|
||||
pub fn prepare_ui_slices(
|
||||
mut commands: Commands,
|
||||
render_device: Res<RenderDevice>,
|
||||
|
@ -38,10 +38,6 @@ impl ChildBufferCache {
|
||||
/// Create a list of root nodes from parentless entities and entities with a `GlobalZIndex` component.
|
||||
/// Then build the `UiStack` from a walk of the existing layout trees starting from each root node,
|
||||
/// filtering branches by `Without<GlobalZIndex>`so that we don't revisit nodes.
|
||||
#[expect(
|
||||
clippy::too_many_arguments,
|
||||
reason = "Could be rewritten with less arguments using a QueryData-implementing struct, but doesn't need to be."
|
||||
)]
|
||||
pub fn ui_stack_system(
|
||||
mut cache: Local<ChildBufferCache>,
|
||||
mut root_nodes: Local<Vec<(Entity, (i32, i32))>>,
|
||||
|
@ -188,10 +188,6 @@ impl Measure for TextMeasure {
|
||||
}
|
||||
}
|
||||
|
||||
#[expect(
|
||||
clippy::too_many_arguments,
|
||||
reason = "Used in measure_text_system to make the function body easier to read"
|
||||
)]
|
||||
#[inline]
|
||||
fn create_text_measure<'a>(
|
||||
entity: Entity,
|
||||
@ -245,10 +241,6 @@ fn create_text_measure<'a>(
|
||||
/// is only able to detect that a `Text` component has changed and will regenerate the `Measure` on
|
||||
/// color changes. This can be expensive, particularly for large blocks of text, and the [`bypass_change_detection`](bevy_ecs::change_detection::DetectChangesMut::bypass_change_detection)
|
||||
/// method should be called when only changing the `Text`'s colors.
|
||||
#[expect(
|
||||
clippy::too_many_arguments,
|
||||
reason = "Could be rewritten with less arguments using a QueryData-implementing struct, but doesn't need to be."
|
||||
)]
|
||||
pub fn measure_text_system(
|
||||
mut scale_factors_buffer: Local<EntityHashMap<f32>>,
|
||||
mut last_scale_factors: Local<EntityHashMap<f32>>,
|
||||
@ -316,10 +308,6 @@ pub fn measure_text_system(
|
||||
core::mem::swap(&mut *last_scale_factors, &mut *scale_factors_buffer);
|
||||
}
|
||||
|
||||
#[expect(
|
||||
clippy::too_many_arguments,
|
||||
reason = "Used in text_system to make the function body easier to read"
|
||||
)]
|
||||
#[inline]
|
||||
fn queue_text(
|
||||
entity: Entity,
|
||||
@ -391,10 +379,6 @@ fn queue_text(
|
||||
///
|
||||
/// [`ResMut<Assets<Image>>`](Assets<Image>) -- This system only adds new [`Image`] assets.
|
||||
/// It does not modify or observe existing ones. The exception is when adding new glyphs to a [`bevy_text::FontAtlas`].
|
||||
#[expect(
|
||||
clippy::too_many_arguments,
|
||||
reason = "Could be rewritten with less arguments using a QueryData-implementing struct, but doesn't need to be."
|
||||
)]
|
||||
pub fn text_system(
|
||||
mut textures: ResMut<Assets<Image>>,
|
||||
fonts: Res<Assets<Font>>,
|
||||
|
@ -202,10 +202,6 @@ pub fn create_monitors(
|
||||
});
|
||||
}
|
||||
|
||||
#[expect(
|
||||
clippy::too_many_arguments,
|
||||
reason = "Could be rewritten with less arguments using a QueryData-implementing struct, but doesn't need to be."
|
||||
)]
|
||||
pub(crate) fn despawn_windows(
|
||||
closing: Query<Entity, With<ClosingWindow>>,
|
||||
mut closed: RemovedComponents<Window>,
|
||||
|
@ -43,10 +43,6 @@ pub struct WinitWindows {
|
||||
|
||||
impl WinitWindows {
|
||||
/// Creates a `winit` window and associates it with our entity.
|
||||
#[expect(
|
||||
clippy::too_many_arguments,
|
||||
reason = "Could be rewritten with less arguments using a QueryData-implementing struct, but doesn't need to be."
|
||||
)]
|
||||
pub fn create_window(
|
||||
&mut self,
|
||||
event_loop: &ActiveEventLoop,
|
||||
|
@ -360,7 +360,6 @@ pub fn extract_colored_mesh2d(
|
||||
}
|
||||
|
||||
/// Queue the 2d meshes marked with [`ColoredMesh2d`] using our custom pipeline and draw function
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn queue_colored_mesh2d(
|
||||
transparent_draw_functions: Res<DrawFunctions<Transparent2d>>,
|
||||
colored_mesh2d_pipeline: Res<ColoredMesh2dPipeline>,
|
||||
|
@ -246,7 +246,6 @@ impl Default for ExampleState {
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
fn example_control_system(
|
||||
mut materials: ResMut<Assets<StandardMaterial>>,
|
||||
controllable: Query<(&MeshMaterial3d<StandardMaterial>, &ExampleControls)>,
|
||||
|
@ -280,7 +280,6 @@ enum DefaultRenderMode {
|
||||
ForwardPrepass,
|
||||
}
|
||||
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
fn switch_mode(
|
||||
mut text: Single<&mut Text>,
|
||||
mut commands: Commands,
|
||||
|
@ -338,7 +338,6 @@ fn move_camera(
|
||||
}
|
||||
|
||||
// Adjusts app settings per user input.
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
fn adjust_app_settings(
|
||||
mut commands: Commands,
|
||||
keyboard_input: Res<ButtonInput<KeyCode>>,
|
||||
|
@ -380,7 +380,6 @@ impl Default for ExampleState {
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
fn example_control_system(
|
||||
mut commands: Commands,
|
||||
mut materials: ResMut<Assets<StandardMaterial>>,
|
||||
|
@ -99,7 +99,6 @@ Freecam Controls:
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
fn run_camera_controller(
|
||||
time: Res<Time>,
|
||||
mut windows: Query<&mut Window>,
|
||||
|
@ -134,7 +134,6 @@ fn setup(
|
||||
}
|
||||
|
||||
// Handle user inputs from the keyboard:
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
fn handle_keypress(
|
||||
mut commands: Commands,
|
||||
keyboard: Res<ButtonInput<KeyCode>>,
|
||||
|
@ -413,7 +413,6 @@ fn setup(
|
||||
}
|
||||
|
||||
// Handle user inputs from the keyboard:
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
fn handle_keypress(
|
||||
mut commands: Commands,
|
||||
keyboard: Res<ButtonInput<KeyCode>>,
|
||||
@ -546,7 +545,6 @@ fn handle_mouse(
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
fn spawn_points(
|
||||
mut commands: Commands,
|
||||
mode: ResMut<SamplingMode>,
|
||||
|
@ -123,7 +123,6 @@ struct InstanceData {
|
||||
color: [f32; 4],
|
||||
}
|
||||
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
fn queue_custom(
|
||||
transparent_3d_draw_functions: Res<DrawFunctions<Transparent3d>>,
|
||||
custom_pipeline: Res<CustomPipeline>,
|
||||
|
@ -261,7 +261,6 @@ impl SpecializedMeshPipeline for CustomMeshPipeline {
|
||||
|
||||
/// A render-world system that enqueues the entity with custom rendering into
|
||||
/// the opaque render phases of each view.
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
fn queue_custom_mesh_pipeline(
|
||||
pipeline_cache: Res<PipelineCache>,
|
||||
custom_mesh_pipeline: Res<CustomMeshPipeline>,
|
||||
|
@ -216,7 +216,6 @@ struct BirdResources {
|
||||
#[derive(Component)]
|
||||
struct StatsText;
|
||||
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
fn setup(
|
||||
mut commands: Commands,
|
||||
args: Res<Args>,
|
||||
@ -323,7 +322,6 @@ fn setup(
|
||||
commands.insert_resource(scheduled);
|
||||
}
|
||||
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
fn mouse_handler(
|
||||
mut commands: Commands,
|
||||
args: Res<Args>,
|
||||
@ -387,7 +385,6 @@ fn bird_velocity_transform(
|
||||
|
||||
const FIXED_DELTA_TIME: f32 = 1.0 / 60.0;
|
||||
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
fn spawn_birds(
|
||||
commands: &mut Commands,
|
||||
args: &Args,
|
||||
|
@ -247,7 +247,6 @@ fn setup_grid(mut commands: Commands, asset_server: Res<AssetServer>, args: Res<
|
||||
});
|
||||
}
|
||||
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
fn spawn_button(
|
||||
commands: &mut ChildBuilder,
|
||||
background_color: Color,
|
||||
|
@ -32,7 +32,6 @@ impl Clips {
|
||||
/// Automatically assign [`AnimationClip`]s to [`AnimationPlayer`] and play
|
||||
/// them, if the clips refer to descendants of the animation player (which is
|
||||
/// the common case).
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
fn assign_clips(
|
||||
mut players: Query<&mut AnimationPlayer>,
|
||||
targets: Query<(Entity, &AnimationTarget)>,
|
||||
|
Loading…
Reference in New Issue
Block a user