From 596307c9b7e94a6434f035f15a63e57a5aae147c Mon Sep 17 00:00:00 2001 From: Jonathan Berglin Date: Sun, 5 Dec 2021 17:59:02 +0000 Subject: [PATCH] Remove unused clippy suppressions --- common/net/src/msg/client.rs | 1 - common/net/src/msg/compression.rs | 3 --- common/net/src/msg/ecs_packet.rs | 1 - common/src/comp/body/humanoid.rs | 1 - common/src/comp/inventory/item/tool.rs | 2 -- common/src/comp/inventory/loadout_builder.rs | 2 -- common/src/figure/mod.rs | 1 - common/src/path.rs | 2 -- common/src/slowjob.rs | 1 - common/src/terrain/map.rs | 2 -- common/src/terrain/mod.rs | 1 - common/src/util/color.rs | 3 --- common/state/src/plugin/errors.rs | 1 - network/src/participant.rs | 1 - server/src/chunk_generator.rs | 1 - server/src/cmd.rs | 1 - server/src/events/entity_creation.rs | 1 - server/src/events/entity_manipulation.rs | 19 +++++++++---------- server/src/persistence/mod.rs | 1 - server/src/rtsim/load_chunks.rs | 1 - server/src/rtsim/mod.rs | 1 - server/src/settings/admin.rs | 2 +- server/src/settings/banlist.rs | 2 +- server/src/settings/server_description.rs | 2 +- server/src/settings/whitelist.rs | 2 +- server/src/sys/agent.rs | 1 - server/src/sys/invite_timeout.rs | 1 - server/src/sys/msg/general.rs | 1 - server/src/sys/msg/register.rs | 1 - server/src/sys/sentinel.rs | 1 + server/src/sys/terrain.rs | 1 - server/src/sys/wiring/compute_outputs.rs | 3 --- server/src/sys/wiring/dispatch_actions.rs | 1 - voxygen/anim/src/biped_large/beam.rs | 1 - voxygen/anim/src/biped_large/dash.rs | 1 - voxygen/anim/src/biped_large/shoot.rs | 1 - voxygen/anim/src/bird_large/shockwave.rs | 1 - voxygen/anim/src/bird_large/swim.rs | 1 - voxygen/anim/src/character/beam.rs | 1 - voxygen/anim/src/character/collect.rs | 2 -- voxygen/anim/src/character/shockwave.rs | 1 - voxygen/anim/src/lib.rs | 2 -- voxygen/egui/src/lib.rs | 1 - voxygen/src/audio/fader.rs | 3 --- voxygen/src/ecs/sys/interpolation.rs | 1 - voxygen/src/hud/buffs.rs | 1 - voxygen/src/hud/chat.rs | 1 - voxygen/src/hud/mod.rs | 1 - voxygen/src/hud/overhead.rs | 1 - voxygen/src/hud/popup.rs | 1 - voxygen/src/hud/prompt_dialog.rs | 1 - voxygen/src/hud/social.rs | 1 - voxygen/src/mesh/terrain.rs | 1 - voxygen/src/render/mod.rs | 1 - voxygen/src/render/pipelines/ui.rs | 1 - voxygen/src/scene/figure/mod.rs | 2 -- voxygen/src/scene/terrain.rs | 1 - voxygen/src/ui/graphic/renderer.rs | 1 - voxygen/src/ui/ice/mod.rs | 1 - voxygen/src/ui/ice/renderer/widget/slider.rs | 1 - voxygen/src/ui/keyed_jobs.rs | 1 - voxygen/src/ui/mod.rs | 2 -- voxygen/src/ui/scale.rs | 2 -- voxygen/src/ui/widgets/item_tooltip.rs | 1 - voxygen/src/ui/widgets/tooltip.rs | 1 - .../examples/chunk_compression_benchmarks.rs | 5 ----- world/src/column/mod.rs | 2 -- world/src/layer/tree.rs | 1 - world/src/sim/diffusion.rs | 2 -- world/src/sim/erosion.rs | 5 ----- .../site/settlement/building/archetype/mod.rs | 1 - world/src/site/settlement/mod.rs | 1 - world/src/util/structure.rs | 1 - 73 files changed, 14 insertions(+), 108 deletions(-) diff --git a/common/net/src/msg/client.rs b/common/net/src/msg/client.rs index 4f7b18ffa0..2646124158 100644 --- a/common/net/src/msg/client.rs +++ b/common/net/src/msg/client.rs @@ -12,7 +12,6 @@ use vek::*; /// streams though). It's used to verify the correctness of the state in /// debug_assertions #[derive(Debug, Clone)] -#[allow(clippy::large_enum_variant)] // TODO: this is used for pings so we should probably look into lowering enum size (doesn't effect bandwidth but could effect CPU costs) pub enum ClientMsg { ///Send on the first connection ONCE to identify client intention for /// server diff --git a/common/net/src/msg/compression.rs b/common/net/src/msg/compression.rs index fc7f9aaea0..7d02c95efb 100644 --- a/common/net/src/msg/compression.rs +++ b/common/net/src/msg/compression.rs @@ -85,7 +85,6 @@ impl PackingFormula for WidePacking { #[inline(always)] fn dimensions(&self, dims: Vec3) -> (u32, u32) { (dims.x * dims.z, dims.y) } - #[allow(clippy::many_single_char_names)] #[inline(always)] fn index(&self, dims: Vec3, x: u32, y: u32, z: u32) -> (u32, u32) { let i0 = if FLIP_X { @@ -113,7 +112,6 @@ impl PackingFormula for GridLtrPacking { (dims.x * rootz, dims.y * rootz) } - #[allow(clippy::many_single_char_names)] #[inline(always)] fn index(&self, dims: Vec3, x: u32, y: u32, z: u32) -> (u32, u32) { let rootz = (dims.z as f64).sqrt().ceil() as u32; @@ -337,7 +335,6 @@ impl VoxelImageDecoding for QuadPngEncoding { Some((a, b, c, d)) } - #[allow(clippy::many_single_char_names)] fn get_block(ws: &Self::Workspace, x: u32, y: u32, is_border: bool) -> Block { if let Some(kind) = BlockKind::from_u8(ws.0.get_pixel(x, y).0[0]) { if kind.is_filled() { diff --git a/common/net/src/msg/ecs_packet.rs b/common/net/src/msg/ecs_packet.rs index 09dcf509c2..efaa3fb36a 100644 --- a/common/net/src/msg/ecs_packet.rs +++ b/common/net/src/msg/ecs_packet.rs @@ -8,7 +8,6 @@ use sum_type::sum_type; // Automatically derive From for EcsCompPacket // for each variant EcsCompPacket::T(T.) sum_type! { - #[allow(clippy::large_enum_variant)] // TODO: Pending review in #587 #[derive(Clone, Debug, Serialize, Deserialize)] pub enum EcsCompPacket { Body(comp::Body), diff --git a/common/src/comp/body/humanoid.rs b/common/src/comp/body/humanoid.rs index 42b41b6e37..04af7d4d8a 100644 --- a/common/src/comp/body/humanoid.rs +++ b/common/src/comp/body/humanoid.rs @@ -1,4 +1,3 @@ -#![allow(clippy::nonstandard_macro_braces)] //tmp as of false positive !? use crate::{make_case_elim, make_proj_elim}; use rand::{seq::SliceRandom, thread_rng, Rng}; use serde::{Deserialize, Serialize}; diff --git a/common/src/comp/inventory/item/tool.rs b/common/src/comp/inventory/item/tool.rs index d796ecddcd..9a287850f5 100644 --- a/common/src/comp/inventory/item/tool.rs +++ b/common/src/comp/inventory/item/tool.rs @@ -264,7 +264,6 @@ pub struct Tool { impl Tool { // DO NOT USE UNLESS YOU KNOW WHAT YOU ARE DOING // Added for CSV import of stats - #[allow(clippy::too_many_arguments)] pub fn new(kind: ToolKind, hands: Hands, stats: Stats) -> Self { Self { kind, @@ -378,7 +377,6 @@ impl AbilitySet { } } -#[allow(clippy::derivable_impls)] impl Default for AbilitySet { fn default() -> Self { AbilitySet { diff --git a/common/src/comp/inventory/loadout_builder.rs b/common/src/comp/inventory/loadout_builder.rs index cb554b7c5c..61adfa02f4 100644 --- a/common/src/comp/inventory/loadout_builder.rs +++ b/common/src/comp/inventory/loadout_builder.rs @@ -371,7 +371,6 @@ impl LoadoutBuilder { /// Will panic if asset is broken pub fn from_asset_expect(asset_specifier: &str, rng: Option<&mut impl Rng>) -> Self { // It's impossible to use lambdas because `loadout` is used by value - #![allow(clippy::option_if_let_else)] let loadout = Self::empty(); if let Some(rng) = rng { @@ -463,7 +462,6 @@ impl LoadoutBuilder { }; // closures can't be used here, because it moves value - #[allow(clippy::option_if_let_else)] if let Some(chest) = chest { self.chest(Some(Item::new_from_asset_expect(chest))) } else { diff --git a/common/src/figure/mod.rs b/common/src/figure/mod.rs index 1a68004d04..0fc9ee8cae 100644 --- a/common/src/figure/mod.rs +++ b/common/src/figure/mod.rs @@ -196,7 +196,6 @@ impl MatSegment { }) } - #[allow(clippy::identity_op)] pub fn from_vox(dot_vox_data: &DotVoxData, flipped: bool) -> Self { if let Some(model) = dot_vox_data.models.get(0) { let palette = dot_vox_data diff --git a/common/src/path.rs b/common/src/path.rs index 11a367ed0b..ad77ca2fd3 100644 --- a/common/src/path.rs +++ b/common/src/path.rs @@ -487,7 +487,6 @@ impl Chaser { } } -#[allow(clippy::float_cmp)] // TODO: Pending review in #587 fn walkable(vol: &V, pos: Vec3) -> bool where V: BaseVol + ReadVol, @@ -951,7 +950,6 @@ fn informed_rrt_connect( /// along the axis between the foci. The value of the search parameter must be /// greater than zero. In order to increase the sample area, the /// search_parameter should be increased linearly as the search continues. -#[allow(clippy::many_single_char_names)] #[cfg(rrt_pathfinding)] pub fn point_on_prolate_spheroid( focus1: Vec3, diff --git a/common/src/slowjob.rs b/common/src/slowjob.rs index 1251aae4b5..a1f613b21e 100644 --- a/common/src/slowjob.rs +++ b/common/src/slowjob.rs @@ -401,7 +401,6 @@ impl SlowJobPool { mod tests { use super::*; - #[allow(clippy::blacklisted_name)] fn mock_pool( pool_threads: usize, global_threads: u64, diff --git a/common/src/terrain/map.rs b/common/src/terrain/map.rs index 3f23b0fd53..887cd89990 100644 --- a/common/src/terrain/map.rs +++ b/common/src/terrain/map.rs @@ -147,7 +147,6 @@ impl MapSizeLg { // not technically been stabilized yet, Clippy probably doesn't check for this // case yet. When it can, or when is_some() is stabilized as a `const fn`, // we should deal with this. - #[allow(clippy::result_unit_err)] /// Construct a new `MapSizeLg`, returning an error if the needed invariants /// do not hold and the vector otherwise. /// @@ -430,7 +429,6 @@ impl<'a> MapConfig<'a> { /// sample_wpos is a simple function that, given a *column* position, /// returns the approximate altitude at that column. When in doubt, try /// using `MapConfig::sample_wpos` for this. - #[allow(clippy::many_single_char_names)] pub fn generate( &self, sample_pos: impl Fn(Vec2) -> MapSample, diff --git a/common/src/terrain/mod.rs b/common/src/terrain/mod.rs index d5d8d87042..2084852f56 100644 --- a/common/src/terrain/mod.rs +++ b/common/src/terrain/mod.rs @@ -289,7 +289,6 @@ pub fn river_spline_coeffs( /// curve"... hopefully this works out okay and gives us what we want (a /// river that extends outwards tangent to a quadratic curve, with width /// configured by distance along the line). -#[allow(clippy::many_single_char_names)] pub fn quadratic_nearest_point( spline: &Vec3>, point: Vec2, diff --git a/common/src/util/color.rs b/common/src/util/color.rs index c1e4c273d2..465b2e08ee 100644 --- a/common/src/util/color.rs +++ b/common/src/util/color.rs @@ -39,8 +39,6 @@ pub fn linear_to_srgba(col: Rgba) -> Rgba { /// Convert rgb to hsv. Expects rgb to be [0, 1]. #[inline(always)] -#[allow(clippy::many_single_char_names)] -#[allow(clippy::float_cmp)] // TODO: Pending review in #587 pub fn rgb_to_hsv(rgb: Rgb) -> Vec3 { let (r, g, b) = rgb.into_tuple(); let (max, min, diff, add) = { @@ -73,7 +71,6 @@ pub fn rgb_to_hsv(rgb: Rgb) -> Vec3 { /// Convert hsv to rgb. Expects h [0, 360], s [0, 1], v [0, 1] #[inline(always)] -#[allow(clippy::many_single_char_names)] pub fn hsv_to_rgb(hsv: Vec3) -> Rgb { let (h, s, v) = hsv.into_tuple(); let c = s * v; diff --git a/common/state/src/plugin/errors.rs b/common/state/src/plugin/errors.rs index 0529c5b5c0..1709c60365 100644 --- a/common/state/src/plugin/errors.rs +++ b/common/state/src/plugin/errors.rs @@ -1,7 +1,6 @@ use bincode::ErrorKind; use wasmer::{ExportError, InstantiationError, RuntimeError}; -#[allow(clippy::large_enum_variant)] #[derive(Debug)] pub enum PluginError { Io(std::io::Error), diff --git a/network/src/participant.rs b/network/src/participant.rs index 1b585ae653..15410ee3f3 100644 --- a/network/src/participant.rs +++ b/network/src/participant.rs @@ -413,7 +413,6 @@ impl BParticipant { .fetch_sub(Self::BARR_SEND, Ordering::SeqCst); } - #[allow(clippy::too_many_arguments)] async fn recv_mgr( &self, b2a_stream_opened_s: mpsc::UnboundedSender, diff --git a/server/src/chunk_generator.rs b/server/src/chunk_generator.rs index 87124c0cf4..f8655eff0c 100644 --- a/server/src/chunk_generator.rs +++ b/server/src/chunk_generator.rs @@ -26,7 +26,6 @@ pub struct ChunkGenerator { metrics: Arc, } impl ChunkGenerator { - #[allow(clippy::new_without_default)] // TODO: Pending review in #587 pub fn new(metrics: ChunkGenMetrics) -> Self { let (chunk_tx, chunk_rx) = crossbeam_channel::unbounded(); Self { diff --git a/server/src/cmd.rs b/server/src/cmd.rs index cd001dcdd0..7b93f61a61 100644 --- a/server/src/cmd.rs +++ b/server/src/cmd.rs @@ -1869,7 +1869,6 @@ where } } -#[allow(clippy::float_cmp)] // TODO: Pending review in #587 fn handle_object( server: &mut Server, client: EcsEntity, diff --git a/server/src/events/entity_creation.rs b/server/src/events/entity_creation.rs index 06d4e4fc4d..d449977484 100644 --- a/server/src/events/entity_creation.rs +++ b/server/src/events/entity_creation.rs @@ -147,7 +147,6 @@ pub fn handle_create_npc( } } -#[allow(clippy::too_many_arguments)] pub fn handle_create_ship( server: &mut Server, pos: comp::Pos, diff --git a/server/src/events/entity_manipulation.rs b/server/src/events/entity_manipulation.rs index cc7a199178..ec862c858e 100644 --- a/server/src/events/entity_manipulation.rs +++ b/server/src/events/entity_manipulation.rs @@ -105,15 +105,15 @@ pub fn handle_knockback(server: &Server, entity: EcsEntity, impulse: Vec3) /// other players. If the entity that killed it had stats, then give it exp for /// the kill. Experience given is equal to the level of the entity that was /// killed times 10. -// NOTE: Clippy incorrectly warns about a needless collect here because it does not -// understand that the pet count (which is computed during the first iteration over the -// members in range) is actually used by the second iteration over the members in range; -// since we have no way of knowing the pet count before the first loop finishes, we -// definitely need at least two loops. Then (currently) our only options are to store -// the member list in temporary space (e.g. by collecting to a vector), or to repeat -// the loop; but repeating the loop would currently be very inefficient since it has to -// rescan every entity on the server again. -#[allow(clippy::needless_collect)] +// NOTE: Clippy incorrectly warns about a needless collect here because it does +// not understand that the pet count (which is computed during the first +// iteration over the members in range) is actually used by the second iteration +// over the members in range; since we have no way of knowing the pet count +// before the first loop finishes, we definitely need at least two loops. Then +// (currently) our only options are to store the member list in temporary space +// (e.g. by collecting to a vector), or to repeat the loop; but repeating the +// loop would currently be very inefficient since it has to rescan every entity +// on the server again. pub fn handle_destroy(server: &mut Server, entity: EcsEntity, last_change: HealthChange) { let state = server.state_mut(); @@ -581,7 +581,6 @@ pub fn handle_respawn(server: &Server, entity: EcsEntity) { } } -#[allow(clippy::blocks_in_if_conditions)] pub fn handle_explosion(server: &Server, pos: Vec3, explosion: Explosion, owner: Option) { // Go through all other entities let ecs = &server.state.ecs(); diff --git a/server/src/persistence/mod.rs b/server/src/persistence/mod.rs index 298d8224a7..72ef600cca 100644 --- a/server/src/persistence/mod.rs +++ b/server/src/persistence/mod.rs @@ -35,7 +35,6 @@ pub type PersistedComponents = ( // This macro is called at build-time, and produces the necessary migration info // for the `run_migrations` call below. mod embedded { - #![allow(clippy::nonstandard_macro_braces)] //tmp as of false positive !? use refinery::embed_migrations; embed_migrations!("./src/migrations"); } diff --git a/server/src/rtsim/load_chunks.rs b/server/src/rtsim/load_chunks.rs index e370577676..301037cdae 100644 --- a/server/src/rtsim/load_chunks.rs +++ b/server/src/rtsim/load_chunks.rs @@ -6,7 +6,6 @@ use specs::{Read, WriteExpect}; #[derive(Default)] pub struct Sys; impl<'a> System<'a> for Sys { - #[allow(clippy::type_complexity)] type SystemData = (Read<'a, EventBus>, WriteExpect<'a, RtSim>); const NAME: &'static str = "rtsim::load_chunks"; diff --git a/server/src/rtsim/mod.rs b/server/src/rtsim/mod.rs index 61147b0f8d..9db64ae900 100644 --- a/server/src/rtsim/mod.rs +++ b/server/src/rtsim/mod.rs @@ -159,7 +159,6 @@ pub fn init( wpos.distance_squared(spawn_point.0.xy().map(|x| x as i64)) }) .map(|(id, _)| id); - #[allow(clippy::single_match)] match &site.kind { #[allow(clippy::single_match)] SiteKind::Dungeon(dungeon) => match dungeon.dungeon_difficulty() { diff --git a/server/src/settings/admin.rs b/server/src/settings/admin.rs index 52d8a4a150..968a67f5a0 100644 --- a/server/src/settings/admin.rs +++ b/server/src/settings/admin.rs @@ -1,7 +1,6 @@ //! Versioned admins settings files. // NOTE: Needed to allow the second-to-last migration to call try_into(). -#![allow(clippy::useless_conversion)] use super::{ADMINS_FILENAME as FILENAME, MIGRATION_UPGRADE_GUARANTEE}; use crate::settings::editable::{EditableSetting, Version}; @@ -118,6 +117,7 @@ mod v0 { impl TryFrom for Final { type Error = ::Error; + #[allow(clippy::useless_conversion)] fn try_from(mut value: Admins) -> Result { value.validate()?; Ok(next::Admins::migrate(value) diff --git a/server/src/settings/banlist.rs b/server/src/settings/banlist.rs index 35f297b010..086e471f9e 100644 --- a/server/src/settings/banlist.rs +++ b/server/src/settings/banlist.rs @@ -1,7 +1,6 @@ //! Versioned banlist settings files. // NOTE: Needed to allow the second-to-last migration to call try_into(). -#![allow(clippy::useless_conversion)] use super::{BANLIST_FILENAME as FILENAME, MIGRATION_UPGRADE_GUARANTEE}; use crate::settings::editable::{EditableSetting, Version}; @@ -180,6 +179,7 @@ mod v0 { impl TryFrom for Final { type Error = ::Error; + #[allow(clippy::useless_conversion)] fn try_from(mut value: Banlist) -> Result { value.validate()?; Ok(next::Banlist::migrate(value) diff --git a/server/src/settings/server_description.rs b/server/src/settings/server_description.rs index bd7f9308af..c75d08b5a6 100644 --- a/server/src/settings/server_description.rs +++ b/server/src/settings/server_description.rs @@ -1,7 +1,6 @@ //! Versioned server description settings files. // NOTE: Needed to allow the second-to-last migration to call try_into(). -#![allow(clippy::useless_conversion)] use super::{MIGRATION_UPGRADE_GUARANTEE, SERVER_DESCRIPTION_FILENAME as FILENAME}; use crate::settings::editable::{EditableSetting, Version}; @@ -117,6 +116,7 @@ mod v0 { impl TryFrom for Final { type Error = ::Error; + #[allow(clippy::useless_conversion)] fn try_from(mut value: ServerDescription) -> Result { value.validate()?; Ok(next::ServerDescription::migrate(value) diff --git a/server/src/settings/whitelist.rs b/server/src/settings/whitelist.rs index 377f76c7b5..094f110122 100644 --- a/server/src/settings/whitelist.rs +++ b/server/src/settings/whitelist.rs @@ -1,7 +1,6 @@ //! Versioned whitelist settings files. // NOTE: Needed to allow the second-to-last migration to call try_into(). -#![allow(clippy::useless_conversion)] use super::{MIGRATION_UPGRADE_GUARANTEE, WHITELIST_FILENAME as FILENAME}; use crate::settings::editable::{EditableSetting, Version}; @@ -118,6 +117,7 @@ mod v0 { impl TryFrom for Final { type Error = ::Error; + #[allow(clippy::useless_conversion)] fn try_from(mut value: Whitelist) -> Result { value.validate()?; Ok(next::Whitelist::migrate(value) diff --git a/server/src/sys/agent.rs b/server/src/sys/agent.rs index c637331bd3..41a18b9eeb 100644 --- a/server/src/sys/agent.rs +++ b/server/src/sys/agent.rs @@ -2921,7 +2921,6 @@ impl<'a> AgentData<'a> { } } - #[allow(clippy::branches_sharing_code)] //TODO: evaluate fn handle_quadlow_ranged_attack( &self, agent: &mut Agent, diff --git a/server/src/sys/invite_timeout.rs b/server/src/sys/invite_timeout.rs index a55690ceba..aa77110664 100644 --- a/server/src/sys/invite_timeout.rs +++ b/server/src/sys/invite_timeout.rs @@ -11,7 +11,6 @@ use specs::{Entities, Join, ReadStorage, WriteStorage}; #[derive(Default)] pub struct Sys; impl<'a> System<'a> for Sys { - #[allow(clippy::type_complexity)] type SystemData = ( Entities<'a>, WriteStorage<'a, Invite>, diff --git a/server/src/sys/msg/general.rs b/server/src/sys/msg/general.rs index fa9a486bfa..0bfada3a31 100644 --- a/server/src/sys/msg/general.rs +++ b/server/src/sys/msg/general.rs @@ -13,7 +13,6 @@ use specs::{Entities, Join, Read, ReadStorage}; use tracing::{debug, error, warn}; impl Sys { - #[allow(clippy::too_many_arguments)] fn handle_general_msg( server_emitter: &mut common::event::Emitter<'_, ServerEvent>, entity: specs::Entity, diff --git a/server/src/sys/msg/register.rs b/server/src/sys/msg/register.rs index 7743c5d35e..dc9c0cc9e5 100644 --- a/server/src/sys/msg/register.rs +++ b/server/src/sys/msg/register.rs @@ -49,7 +49,6 @@ pub struct ReadData<'a> { #[derive(Default)] pub struct Sys; impl<'a> System<'a> for Sys { - #[allow(clippy::type_complexity)] type SystemData = ( ReadData<'a>, WriteStorage<'a, Player>, diff --git a/server/src/sys/sentinel.rs b/server/src/sys/sentinel.rs index 0f45b9d978..7d4008ec5d 100644 --- a/server/src/sys/sentinel.rs +++ b/server/src/sys/sentinel.rs @@ -1,3 +1,4 @@ +#![allow(clippy::large_enum_variant)] use common::{ comp::{ item::{tool::AbilityMap, MaterialStatManifest}, diff --git a/server/src/sys/terrain.rs b/server/src/sys/terrain.rs index 55d7429797..acafdf5fc6 100644 --- a/server/src/sys/terrain.rs +++ b/server/src/sys/terrain.rs @@ -46,7 +46,6 @@ pub(crate) struct LazyTerrainMessage { pub const SAFE_ZONE_RADIUS: f32 = 200.0; impl LazyTerrainMessage { - #[allow(clippy::new_without_default)] pub(crate) fn new() -> Self { Self { lazy_msg_lo: None, diff --git a/server/src/sys/wiring/compute_outputs.rs b/server/src/sys/wiring/compute_outputs.rs index 651e631234..ef67da71f8 100644 --- a/server/src/sys/wiring/compute_outputs.rs +++ b/server/src/sys/wiring/compute_outputs.rs @@ -49,7 +49,6 @@ pub fn compute_outputs(system_data: &WiringData) -> HashMap, @@ -130,7 +128,6 @@ fn output_formula_on_death( 0.0 } -#[allow(clippy::too_many_arguments)] fn output_formula_logic( logic: &Logic, inputs: &HashMap, diff --git a/server/src/sys/wiring/dispatch_actions.rs b/server/src/sys/wiring/dispatch_actions.rs index ea28c4405a..6eeee7bb08 100644 --- a/server/src/sys/wiring/dispatch_actions.rs +++ b/server/src/sys/wiring/dispatch_actions.rs @@ -147,7 +147,6 @@ fn dispatch_action_set_light( } } -#[allow(clippy::too_many_arguments)] fn dispatch_action_set_block( coord: vek::Vec3, block: Block, diff --git a/voxygen/anim/src/biped_large/beam.rs b/voxygen/anim/src/biped_large/beam.rs index 5d227d6aed..7dbd9d3145 100644 --- a/voxygen/anim/src/biped_large/beam.rs +++ b/voxygen/anim/src/biped_large/beam.rs @@ -27,7 +27,6 @@ impl Animation for BeamAnimation { const UPDATE_FN: &'static [u8] = b"biped_large_beam\0"; #[cfg_attr(feature = "be-dyn-lib", export_name = "biped_large_beam")] - #[allow(clippy::single_match)] // TODO: Pending review in #587 fn update_skeleton_inner<'a>( skeleton: &Self::Skeleton, ( diff --git a/voxygen/anim/src/biped_large/dash.rs b/voxygen/anim/src/biped_large/dash.rs index d6afe76e47..8920d939ca 100644 --- a/voxygen/anim/src/biped_large/dash.rs +++ b/voxygen/anim/src/biped_large/dash.rs @@ -26,7 +26,6 @@ impl Animation for DashAnimation { const UPDATE_FN: &'static [u8] = b"biped_large_dash\0"; #[cfg_attr(feature = "be-dyn-lib", export_name = "biped_large_dash")] - #[allow(clippy::single_match)] // TODO: Pending review in #587 fn update_skeleton_inner<'a>( skeleton: &Self::Skeleton, ( diff --git a/voxygen/anim/src/biped_large/shoot.rs b/voxygen/anim/src/biped_large/shoot.rs index 1e69916a0a..1b9f2ef51b 100644 --- a/voxygen/anim/src/biped_large/shoot.rs +++ b/voxygen/anim/src/biped_large/shoot.rs @@ -188,7 +188,6 @@ impl Animation for ShootAnimation { }, Some(ToolKind::Natural) => { if let Some(AbilitySpec::Custom(spec)) = active_tool_spec { - #[allow(clippy::single_match)] match spec.as_str() { "Wendigo Magic" => { let (move1base, _move2base, move3) = match stage_section { diff --git a/voxygen/anim/src/bird_large/shockwave.rs b/voxygen/anim/src/bird_large/shockwave.rs index 55305741da..70dc4e0012 100644 --- a/voxygen/anim/src/bird_large/shockwave.rs +++ b/voxygen/anim/src/bird_large/shockwave.rs @@ -7,7 +7,6 @@ use common::states::utils::StageSection; pub struct ShockwaveAnimation; impl Animation for ShockwaveAnimation { - #[allow(clippy::type_complexity)] type Dependency<'a> = (Option, bool); type Skeleton = BirdLargeSkeleton; diff --git a/voxygen/anim/src/bird_large/swim.rs b/voxygen/anim/src/bird_large/swim.rs index 9c809bdd6a..83f6fc868f 100644 --- a/voxygen/anim/src/bird_large/swim.rs +++ b/voxygen/anim/src/bird_large/swim.rs @@ -7,7 +7,6 @@ use std::ops::Mul; pub struct SwimAnimation; impl Animation for SwimAnimation { - #[allow(clippy::type_complexity)] type Dependency<'a> = f32; type Skeleton = BirdLargeSkeleton; diff --git a/voxygen/anim/src/character/beam.rs b/voxygen/anim/src/character/beam.rs index fe17d583df..bb4fda9f27 100644 --- a/voxygen/anim/src/character/beam.rs +++ b/voxygen/anim/src/character/beam.rs @@ -25,7 +25,6 @@ impl Animation for BeamAnimation { const UPDATE_FN: &'static [u8] = b"character_beam\0"; #[cfg_attr(feature = "be-dyn-lib", export_name = "character_beam")] - #[allow(clippy::single_match)] // TODO: Pending review in #587 fn update_skeleton_inner<'a>( skeleton: &Self::Skeleton, (ability_info, hands, _global_time, velocity, stage_section): Self::Dependency<'a>, diff --git a/voxygen/anim/src/character/collect.rs b/voxygen/anim/src/character/collect.rs index 92fec8ef2c..84f2e22f02 100644 --- a/voxygen/anim/src/character/collect.rs +++ b/voxygen/anim/src/character/collect.rs @@ -8,7 +8,6 @@ use std::f32::consts::PI; pub struct CollectAnimation; impl Animation for CollectAnimation { - #[allow(clippy::type_complexity)] type Dependency<'a> = (Vec3, f32, Option, Vec3); type Skeleton = CharacterSkeleton; @@ -16,7 +15,6 @@ impl Animation for CollectAnimation { const UPDATE_FN: &'static [u8] = b"character_collect\0"; #[cfg_attr(feature = "be-dyn-lib", export_name = "character_collect")] - #[allow(clippy::single_match)] // TODO: Pending review in #587 fn update_skeleton_inner<'a>( skeleton: &Self::Skeleton, (position, _global_time, stage_section, sprite_pos): Self::Dependency<'a>, diff --git a/voxygen/anim/src/character/shockwave.rs b/voxygen/anim/src/character/shockwave.rs index 1bb97225da..ab3f917928 100644 --- a/voxygen/anim/src/character/shockwave.rs +++ b/voxygen/anim/src/character/shockwave.rs @@ -27,7 +27,6 @@ impl Animation for ShockwaveAnimation { const UPDATE_FN: &'static [u8] = b"character_shockwave\0"; #[cfg_attr(feature = "be-dyn-lib", export_name = "character_shockwave")] - #[allow(clippy::single_match)] // TODO: Pending review in #587 fn update_skeleton_inner<'a>( skeleton: &Self::Skeleton, (_ability_info, hands, _global_time, velocity, stage_section): Self::Dependency<'a>, diff --git a/voxygen/anim/src/lib.rs b/voxygen/anim/src/lib.rs index edc81e626e..92050272b1 100644 --- a/voxygen/anim/src/lib.rs +++ b/voxygen/anim/src/lib.rs @@ -135,7 +135,6 @@ pub fn compute_matrices( let lock = LIB.lock().unwrap(); let lib = &lock.as_ref().unwrap().lib; - #[allow(clippy::type_complexity)] let compute_fn: voxygen_dynlib::Symbol< fn(&S, Mat4, &mut [FigureBoneData; MAX_BONE_COUNT], S::Body) -> Offsets, > = unsafe { lib.get(S::COMPUTE_FN) }.unwrap_or_else(|e| { @@ -187,7 +186,6 @@ pub trait Animation { let lock = LIB.lock().unwrap(); let lib = &lock.as_ref().unwrap().lib; - #[allow(clippy::type_complexity)] let update_fn: voxygen_dynlib::Symbol< fn( &Self::Skeleton, diff --git a/voxygen/egui/src/lib.rs b/voxygen/egui/src/lib.rs index e0a74c225f..8c80955a42 100644 --- a/voxygen/egui/src/lib.rs +++ b/voxygen/egui/src/lib.rs @@ -164,7 +164,6 @@ pub fn maintain( let lock = LIB.lock().unwrap(); let lib = &lock.as_ref().unwrap().lib; - #[allow(clippy::type_complexity)] let maintain_fn: voxygen_dynlib::Symbol< fn( &mut Platform, diff --git a/voxygen/src/audio/fader.rs b/voxygen/src/audio/fader.rs index 18211595e2..d14352737a 100644 --- a/voxygen/src/audio/fader.rs +++ b/voxygen/src/audio/fader.rs @@ -117,7 +117,6 @@ mod tests { } #[test] - #[allow(clippy::float_cmp)] // TODO: Pending review in #587 fn fade_out_completes() { let mut fader = Fader::fade_out(Duration::from_secs(10), 1.0); @@ -161,7 +160,6 @@ mod tests { } #[test] - #[allow(clippy::float_cmp)] // TODO: Pending review in #587 fn update_target_volume_fading_in_when_currently_above() { let mut fader = Fader::fade_in(Duration::from_secs(10), 1.0); @@ -178,7 +176,6 @@ mod tests { } #[test] - #[allow(clippy::float_cmp)] // TODO: Pending review in #587 fn update_target_volume_fading_in_when_currently_below() { let mut fader = Fader::fade_in(Duration::from_secs(20), 1.0); diff --git a/voxygen/src/ecs/sys/interpolation.rs b/voxygen/src/ecs/sys/interpolation.rs index 9abe8af9c5..7479dbd3e9 100644 --- a/voxygen/src/ecs/sys/interpolation.rs +++ b/voxygen/src/ecs/sys/interpolation.rs @@ -91,7 +91,6 @@ impl<'a> System<'a> for Sys { } } -#[allow(clippy::collapsible_match)] fn base_ori_interp(body: &Body) -> f32 { match body { Body::Object(object) => match object { diff --git a/voxygen/src/hud/buffs.rs b/voxygen/src/hud/buffs.rs index 1b1c8c094f..4ae312a593 100644 --- a/voxygen/src/hud/buffs.rs +++ b/voxygen/src/hud/buffs.rs @@ -48,7 +48,6 @@ pub struct BuffsBar<'a> { } impl<'a> BuffsBar<'a> { - #[allow(clippy::too_many_arguments)] // TODO: Pending review in #587 pub fn new( imgs: &'a Imgs, fonts: &'a Fonts, diff --git a/voxygen/src/hud/chat.rs b/voxygen/src/hud/chat.rs index f1aea0ee3f..c4d8f176df 100644 --- a/voxygen/src/hud/chat.rs +++ b/voxygen/src/hud/chat.rs @@ -203,7 +203,6 @@ impl<'a> Widget for Chat<'a> { fn style(&self) -> Self::Style {} - #[allow(clippy::single_match)] // TODO: Pending review in #587 fn update(self, args: widget::UpdateArgs) -> Self::Event { common_base::prof_span!("Chat::update"); diff --git a/voxygen/src/hud/mod.rs b/voxygen/src/hud/mod.rs index d4fdb380de..19d9a0780a 100644 --- a/voxygen/src/hud/mod.rs +++ b/voxygen/src/hud/mod.rs @@ -3803,7 +3803,6 @@ impl Hud { handled } - #[allow(clippy::blocks_in_if_conditions)] // TODO: Pending review in #587 pub fn maintain( &mut self, client: &Client, diff --git a/voxygen/src/hud/overhead.rs b/voxygen/src/hud/overhead.rs index 231f19915d..d3e3cd8a1e 100644 --- a/voxygen/src/hud/overhead.rs +++ b/voxygen/src/hud/overhead.rs @@ -92,7 +92,6 @@ pub struct Overhead<'a> { } impl<'a> Overhead<'a> { - #[allow(clippy::too_many_arguments)] // TODO: Pending review in #587 pub fn new( info: Option>, bubble: Option<&'a SpeechBubble>, diff --git a/voxygen/src/hud/popup.rs b/voxygen/src/hud/popup.rs index a87feaecb2..afb10a7de9 100644 --- a/voxygen/src/hud/popup.rs +++ b/voxygen/src/hud/popup.rs @@ -83,7 +83,6 @@ impl<'a> Widget for Popup<'a> { fn style(&self) -> Self::Style {} - #[allow(clippy::single_match)] // TODO: Pending review in #587 fn update(self, args: widget::UpdateArgs) -> Self::Event { common_base::prof_span!("Popup::update"); let widget::UpdateArgs { state, ui, .. } = args; diff --git a/voxygen/src/hud/prompt_dialog.rs b/voxygen/src/hud/prompt_dialog.rs index 769100fc86..64a66a91d6 100644 --- a/voxygen/src/hud/prompt_dialog.rs +++ b/voxygen/src/hud/prompt_dialog.rs @@ -38,7 +38,6 @@ pub struct PromptDialog<'a> { } impl<'a> PromptDialog<'a> { - #[allow(clippy::too_many_arguments)] // TODO: Pending review in #587 pub fn new( imgs: &'a Imgs, fonts: &'a Fonts, diff --git a/voxygen/src/hud/social.rs b/voxygen/src/hud/social.rs index bb2fbe5967..b46ceac8ac 100644 --- a/voxygen/src/hud/social.rs +++ b/voxygen/src/hud/social.rs @@ -58,7 +58,6 @@ pub struct Social<'a> { } impl<'a> Social<'a> { - #[allow(clippy::too_many_arguments)] // TODO: Pending review in #587 pub fn new( show: &'a Show, client: &'a Client, diff --git a/voxygen/src/mesh/terrain.rs b/voxygen/src/mesh/terrain.rs index 605d10ba14..81f22cbad7 100644 --- a/voxygen/src/mesh/terrain.rs +++ b/voxygen/src/mesh/terrain.rs @@ -224,7 +224,6 @@ fn calc_light + ReadVol + Debug>( } } -#[allow(clippy::many_single_char_names)] #[allow(clippy::type_complexity)] pub fn generate_mesh<'a, V: RectRasterableVol + ReadVol + Debug + 'static>( vol: &'a VolGrid2d, diff --git a/voxygen/src/render/mod.rs b/voxygen/src/render/mod.rs index b98fc788c8..594a114384 100644 --- a/voxygen/src/render/mod.rs +++ b/voxygen/src/render/mod.rs @@ -209,7 +209,6 @@ pub enum ShadowMode { Cheap, } -#[allow(clippy::derivable_impls)] impl Default for ShadowMode { fn default() -> Self { ShadowMode::Map(Default::default()) } } diff --git a/voxygen/src/render/pipelines/ui.rs b/voxygen/src/render/pipelines/ui.rs index 26e7e21de1..8181af9e10 100644 --- a/voxygen/src/render/pipelines/ui.rs +++ b/voxygen/src/render/pipelines/ui.rs @@ -258,7 +258,6 @@ pub fn create_quad( create_quad_vert_gradient(rect, uv_rect, color, color, mode) } -#[allow(clippy::many_single_char_names)] pub fn create_quad_vert_gradient( rect: Aabr, uv_rect: Aabr, diff --git a/voxygen/src/scene/figure/mod.rs b/voxygen/src/scene/figure/mod.rs index bdc9c9ee8e..7208365b6c 100644 --- a/voxygen/src/scene/figure/mod.rs +++ b/voxygen/src/scene/figure/mod.rs @@ -4960,7 +4960,6 @@ impl FigureMgr { }); } - #[allow(clippy::too_many_arguments)] // TODO: Pending review in #587 pub fn render<'a>( &'a self, drawer: &mut FigureDrawer<'_, 'a>, @@ -5011,7 +5010,6 @@ impl FigureMgr { } } - #[allow(clippy::too_many_arguments)] // TODO: Pending review in #587 pub fn render_player<'a>( &'a self, drawer: &mut FigureDrawer<'_, 'a>, diff --git a/voxygen/src/scene/terrain.rs b/voxygen/src/scene/terrain.rs index 31d06afd4e..d8a714e5df 100644 --- a/voxygen/src/scene/terrain.rs +++ b/voxygen/src/scene/terrain.rs @@ -376,7 +376,6 @@ pub struct SpriteRenderContext { pub type SpriteRenderContextLazy = Box SpriteRenderContext>; impl SpriteRenderContext { - #[allow(clippy::float_cmp)] // TODO: Pending review in #587 pub fn new(renderer: &mut Renderer) -> SpriteRenderContextLazy { let max_texture_size = renderer.max_texture_size(); diff --git a/voxygen/src/ui/graphic/renderer.rs b/voxygen/src/ui/graphic/renderer.rs index bb20ebbd11..bfb0fd12d4 100644 --- a/voxygen/src/ui/graphic/renderer.rs +++ b/voxygen/src/ui/graphic/renderer.rs @@ -68,7 +68,6 @@ impl euc::Interpolate for VsOut { } #[inline(always)] - #[allow(clippy::many_single_char_names)] fn lerp3(a: Self, b: Self, c: Self, x: f32, y: f32, z: f32) -> Self { //a * x + b * y + c * z Self( diff --git a/voxygen/src/ui/ice/mod.rs b/voxygen/src/ui/ice/mod.rs index 7c18378a6e..cb94e181f6 100644 --- a/voxygen/src/ui/ice/mod.rs +++ b/voxygen/src/ui/ice/mod.rs @@ -190,7 +190,6 @@ impl IcedUi { let messages = { span!(_guard, "update user_interface"); let mut messages = Vec::new(); - #[allow(clippy::manual_map)] let _event_status_list = user_interface.update( &self.events, cursor_position, diff --git a/voxygen/src/ui/ice/renderer/widget/slider.rs b/voxygen/src/ui/ice/renderer/widget/slider.rs index 7441254555..ec624105bf 100644 --- a/voxygen/src/ui/ice/renderer/widget/slider.rs +++ b/voxygen/src/ui/ice/renderer/widget/slider.rs @@ -79,7 +79,6 @@ impl slider::Renderer for IcedRenderer { mouse::Interaction::Idle }; - #[allow(clippy::branches_sharing_code)] // TODO: remove #[allow(clippy::if_same_then_else)] // TODO: remove let primitives = if style.labels { // TODO text label on left and right ends diff --git a/voxygen/src/ui/keyed_jobs.rs b/voxygen/src/ui/keyed_jobs.rs index bbbd7ab67d..042c99e80c 100644 --- a/voxygen/src/ui/keyed_jobs.rs +++ b/voxygen/src/ui/keyed_jobs.rs @@ -21,7 +21,6 @@ pub struct KeyedJobs { const KEYEDJOBS_GC_INTERVAL: Duration = Duration::from_secs(1); impl KeyedJobs { - #[allow(clippy::new_without_default)] pub fn new(name: &'static str) -> Self { let (tx, rx) = crossbeam_channel::unbounded(); Self { diff --git a/voxygen/src/ui/mod.rs b/voxygen/src/ui/mod.rs index ce29fa2cc9..bade6696c2 100644 --- a/voxygen/src/ui/mod.rs +++ b/voxygen/src/ui/mod.rs @@ -320,7 +320,6 @@ impl Ui { pub fn widget_input(&self, id: widget::Id) -> Widget { self.ui.widget_input(id) } - #[allow(clippy::float_cmp)] // TODO: Pending review in #587 pub fn maintain( &mut self, renderer: &mut Renderer, @@ -580,7 +579,6 @@ impl Ui { }); if glyph_missing { - #[allow(clippy::branches_sharing_code)] // TODO: evaluate (ask sharp) if *retry { // If a glyph was missing and this was our second try, we know something was // messed up during the glyph_cache redraw. It is possible that diff --git a/voxygen/src/ui/scale.rs b/voxygen/src/ui/scale.rs index 65873e051a..542f10112c 100644 --- a/voxygen/src/ui/scale.rs +++ b/voxygen/src/ui/scale.rs @@ -85,7 +85,6 @@ impl Scale { /// Updates window size /// Returns true if the value was changed - #[allow(clippy::float_cmp)] pub fn surface_resized(&mut self, new_res: Vec2) -> bool { let old_res = self.physical_resolution; self.physical_resolution = new_res; @@ -94,7 +93,6 @@ impl Scale { /// Updates scale factor /// Returns true if the value was changed - #[allow(clippy::float_cmp)] pub fn scale_factor_changed(&mut self, scale_factor: f64) -> bool { let old_scale_factor = self.scale_factor; self.scale_factor = scale_factor; diff --git a/voxygen/src/ui/widgets/item_tooltip.rs b/voxygen/src/ui/widgets/item_tooltip.rs index 8666cb2aa9..cb4a104596 100644 --- a/voxygen/src/ui/widgets/item_tooltip.rs +++ b/voxygen/src/ui/widgets/item_tooltip.rs @@ -110,7 +110,6 @@ impl ItemTooltipManager { } } - #[allow(clippy::too_many_arguments)] // TODO: Pending review in #587 fn set_tooltip<'a, I>( &mut self, tooltip: &'a ItemTooltip, diff --git a/voxygen/src/ui/widgets/tooltip.rs b/voxygen/src/ui/widgets/tooltip.rs index 1129678df1..edb13c288a 100644 --- a/voxygen/src/ui/widgets/tooltip.rs +++ b/voxygen/src/ui/widgets/tooltip.rs @@ -91,7 +91,6 @@ impl TooltipManager { } // return true if visible - #[allow(clippy::too_many_arguments)] // TODO: Pending review in #587 fn set_tooltip( &mut self, tooltip: &Tooltip, diff --git a/world/examples/chunk_compression_benchmarks.rs b/world/examples/chunk_compression_benchmarks.rs index 4db1ad270d..7d5698c41b 100644 --- a/world/examples/chunk_compression_benchmarks.rs +++ b/world/examples/chunk_compression_benchmarks.rs @@ -147,7 +147,6 @@ impl PackingFormula for TallPacking { #[inline(always)] fn dimensions(&self, dims: Vec3) -> (u32, u32) { (dims.x, dims.y * dims.z) } - #[allow(clippy::many_single_char_names)] #[inline(always)] fn index(&self, dims: Vec3, x: u32, y: u32, z: u32) -> (u32, u32) { let i = x; @@ -253,7 +252,6 @@ pub struct MixedEncoding; impl VoxelImageEncoding for MixedEncoding { type Output = (Vec, [usize; 3]); - #[allow(clippy::type_complexity)] type Workspace = ( ImageBuffer, Vec>, ImageBuffer, Vec>, @@ -592,9 +590,7 @@ impl NearestNeighbor for RTree { pub struct PaletteEncoding<'a, NN: NearestNeighbor, const N: u32>(&'a HashMap); impl<'a, NN: NearestNeighbor, const N: u32> VoxelImageEncoding for PaletteEncoding<'a, NN, N> { - #[allow(clippy::type_complexity)] type Output = CompressedData<(Vec, [usize; 4])>; - #[allow(clippy::type_complexity)] type Workspace = ( ImageBuffer, Vec>, ImageBuffer, Vec>, @@ -655,7 +651,6 @@ impl<'a, NN: NearestNeighbor, const N: u32> VoxelImageEncoding for PaletteEncodi } } -#[allow(clippy::many_single_char_names)] fn histogram_to_dictionary(histogram: &HashMap, usize>, dictionary: &mut Vec) { let mut tmp: Vec<(Vec, usize)> = histogram.iter().map(|(k, v)| (k.clone(), *v)).collect(); tmp.sort_by_key(|(_, count)| *count); diff --git a/world/src/column/mod.rs b/world/src/column/mod.rs index 36f7079f11..e4b860edc5 100644 --- a/world/src/column/mod.rs +++ b/world/src/column/mod.rs @@ -67,8 +67,6 @@ impl<'a> Sampler<'a> for ColumnGen<'a> { type Index = (Vec2, IndexRef<'a>); type Sample = Option>; - #[allow(clippy::float_cmp)] // TODO: Pending review in #587 - #[allow(clippy::single_match)] // TODO: Pending review in #587 fn get(&self, (wpos, index): Self::Index) -> Option> { let wposf = wpos.map(|e| e as f64); let chunk_pos = wpos.map2(TerrainChunkSize::RECT_SIZE, |e, sz: u32| e / sz as i32); diff --git a/world/src/layer/tree.rs b/world/src/layer/tree.rs index 2826eb0d8f..b6412dbec0 100644 --- a/world/src/layer/tree.rs +++ b/world/src/layer/tree.rs @@ -671,7 +671,6 @@ impl ProceduralTree { // returning the index and AABB of the branch. This AABB gets propagated // down to the parent and is used later during sampling to cull the branches to // be sampled. - #[allow(clippy::too_many_arguments)] fn add_branch( &mut self, config: &TreeConfig, diff --git a/world/src/sim/diffusion.rs b/world/src/sim/diffusion.rs index 1a6551541b..4ffa78a4c4 100644 --- a/world/src/sim/diffusion.rs +++ b/world/src/sim/diffusion.rs @@ -37,7 +37,6 @@ use rayon::prelude::*; implicit none */ -#[allow(clippy::too_many_arguments)] pub fn diffusion( nx: usize, ny: usize, @@ -405,7 +404,6 @@ pub fn diffusion( INTEGER n double precision a(n),b(n),c(n),r(n),u(n) */ -#[allow(clippy::many_single_char_names)] pub fn tridag(a: &[f64], b: &[f64], c: &[f64], r: &[f64], u: &mut [f64], n: usize) { /* INTEGER j diff --git a/world/src/sim/erosion.rs b/world/src/sim/erosion.rs index 9f1bf3b6c2..8db97ba66a 100644 --- a/world/src/sim/erosion.rs +++ b/world/src/sim/erosion.rs @@ -697,8 +697,6 @@ impl m32 { /// Prediction in Geomorphology, Geophysical Monograph 135. /// Copyright 2003 by the American Geophysical Union /// 10.1029/135GM09 -#[allow(clippy::many_single_char_names)] -#[allow(clippy::too_many_arguments)] fn erode( // Underlying map dimensions. map_size_lg: MapSizeLg, @@ -2341,7 +2339,6 @@ pub fn mrec_downhill( /// * A bitmask representing which neighbors are downhill. /// * Stack order for multiple receivers (from top to bottom). /// * The weight for each receiver, for each node. -#[allow(clippy::too_many_arguments)] #[allow(clippy::type_complexity)] // TODO: Pending review in #587 pub fn get_multi_rec>( map_size_lg: MapSizeLg, @@ -2534,8 +2531,6 @@ pub fn get_multi_rec>( } /// Perform erosion n times. -#[allow(clippy::many_single_char_names)] -#[allow(clippy::too_many_arguments)] pub fn do_erosion( map_size_lg: MapSizeLg, _max_uplift: f32, diff --git a/world/src/site/settlement/building/archetype/mod.rs b/world/src/site/settlement/building/archetype/mod.rs index de57107619..169b8e06ed 100644 --- a/world/src/site/settlement/building/archetype/mod.rs +++ b/world/src/site/settlement/building/archetype/mod.rs @@ -20,7 +20,6 @@ pub trait Archetype { where Self: Sized; - #[allow(clippy::too_many_arguments)] fn draw( &self, index: IndexRef, diff --git a/world/src/site/settlement/mod.rs b/world/src/site/settlement/mod.rs index 309bd140ad..6a0a7a8b52 100644 --- a/world/src/site/settlement/mod.rs +++ b/world/src/site/settlement/mod.rs @@ -208,7 +208,6 @@ impl Settlement { pub fn get_origin(&self) -> Vec2 { self.origin } /// Designate hazardous terrain based on world data - #[allow(clippy::blocks_in_if_conditions)] // TODO: Pending review in #587 pub fn designate_from_world(&mut self, sim: &WorldSim, rng: &mut impl Rng) { let tile_radius = self.radius() as i32 / AREA_SIZE as i32; let hazard = self.land.hazard; diff --git a/world/src/util/structure.rs b/world/src/util/structure.rs index b9a0a57cb2..079424083d 100644 --- a/world/src/util/structure.rs +++ b/world/src/util/structure.rs @@ -41,7 +41,6 @@ impl StructureGen2d { fn spread_mul(spread: u32) -> u32 { spread * 2 } #[inline] - #[allow(clippy::too_many_arguments)] fn index_to_sample_internal( freq: i32, freq_offset: i32,