Remove unused clippy suppressions

This commit is contained in:
Jonathan Berglin 2021-12-05 17:59:02 +00:00 committed by Marcel
parent c265102367
commit 596307c9b7
73 changed files with 14 additions and 108 deletions

View File

@ -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

View File

@ -85,7 +85,6 @@ impl<const FLIP_X: bool> PackingFormula for WidePacking<FLIP_X> {
#[inline(always)]
fn dimensions(&self, dims: Vec3<u32>) -> (u32, u32) { (dims.x * dims.z, dims.y) }
#[allow(clippy::many_single_char_names)]
#[inline(always)]
fn index(&self, dims: Vec3<u32>, 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<u32>, x: u32, y: u32, z: u32) -> (u32, u32) {
let rootz = (dims.z as f64).sqrt().ceil() as u32;
@ -337,7 +335,6 @@ impl<const N: u32> VoxelImageDecoding for QuadPngEncoding<N> {
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() {

View File

@ -8,7 +8,6 @@ use sum_type::sum_type;
// Automatically derive From<T> 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),

View File

@ -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};

View File

@ -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<T> AbilitySet<T> {
}
}
#[allow(clippy::derivable_impls)]
impl Default for AbilitySet<AbilityItem> {
fn default() -> Self {
AbilitySet {

View File

@ -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 {

View File

@ -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

View File

@ -487,7 +487,6 @@ impl Chaser {
}
}
#[allow(clippy::float_cmp)] // TODO: Pending review in #587
fn walkable<V>(vol: &V, pos: Vec3<i32>) -> bool
where
V: BaseVol<Vox = Block> + 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<f32>,

View File

@ -401,7 +401,6 @@ impl SlowJobPool {
mod tests {
use super::*;
#[allow(clippy::blacklisted_name)]
fn mock_pool(
pool_threads: usize,
global_threads: u64,

View File

@ -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<i32>) -> MapSample,

View File

@ -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<Vec2<f64>>,
point: Vec2<f64>,

View File

@ -39,8 +39,6 @@ pub fn linear_to_srgba(col: Rgba<f32>) -> Rgba<f32> {
/// 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<f32>) -> Vec3<f32> {
let (r, g, b) = rgb.into_tuple();
let (max, min, diff, add) = {
@ -73,7 +71,6 @@ pub fn rgb_to_hsv(rgb: Rgb<f32>) -> Vec3<f32> {
/// 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<f32>) -> Rgb<f32> {
let (h, s, v) = hsv.into_tuple();
let c = s * v;

View File

@ -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),

View File

@ -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<Stream>,

View File

@ -26,7 +26,6 @@ pub struct ChunkGenerator {
metrics: Arc<ChunkGenMetrics>,
}
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 {

View File

@ -1869,7 +1869,6 @@ where
}
}
#[allow(clippy::float_cmp)] // TODO: Pending review in #587
fn handle_object(
server: &mut Server,
client: EcsEntity,

View File

@ -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,

View File

@ -105,15 +105,15 @@ pub fn handle_knockback(server: &Server, entity: EcsEntity, impulse: Vec3<f32>)
/// 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<f32>, explosion: Explosion, owner: Option<Uid>) {
// Go through all other entities
let ecs = &server.state.ecs();

View File

@ -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");
}

View File

@ -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<ServerEvent>>, WriteExpect<'a, RtSim>);
const NAME: &'static str = "rtsim::load_chunks";

View File

@ -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() {

View File

@ -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<Admins> for Final {
type Error = <Final as EditableSetting>::Error;
#[allow(clippy::useless_conversion)]
fn try_from(mut value: Admins) -> Result<Final, Self::Error> {
value.validate()?;
Ok(next::Admins::migrate(value)

View File

@ -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<Banlist> for Final {
type Error = <Final as EditableSetting>::Error;
#[allow(clippy::useless_conversion)]
fn try_from(mut value: Banlist) -> Result<Final, Self::Error> {
value.validate()?;
Ok(next::Banlist::migrate(value)

View File

@ -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<ServerDescription> for Final {
type Error = <Final as EditableSetting>::Error;
#[allow(clippy::useless_conversion)]
fn try_from(mut value: ServerDescription) -> Result<Final, Self::Error> {
value.validate()?;
Ok(next::ServerDescription::migrate(value)

View File

@ -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<Whitelist> for Final {
type Error = <Final as EditableSetting>::Error;
#[allow(clippy::useless_conversion)]
fn try_from(mut value: Whitelist) -> Result<Final, Self::Error> {
value.validate()?;
Ok(next::Whitelist::migrate(value)

View File

@ -2921,7 +2921,6 @@ impl<'a> AgentData<'a> {
}
}
#[allow(clippy::branches_sharing_code)] //TODO: evaluate
fn handle_quadlow_ranged_attack(
&self,
agent: &mut Agent,

View File

@ -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>,

View File

@ -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,

View File

@ -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>,

View File

@ -1,3 +1,4 @@
#![allow(clippy::large_enum_variant)]
use common::{
comp::{
item::{tool::AbilityMap, MaterialStatManifest},

View File

@ -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,

View File

@ -49,7 +49,6 @@ pub fn compute_outputs(system_data: &WiringData) -> HashMap<Entity, HashMap<Stri
.collect()
}
#[allow(clippy::too_many_arguments)]
pub fn compute_output_with_key(
// yes, this function is defined only to make one place
// look a bit nicer
@ -73,7 +72,6 @@ pub fn compute_output_with_key(
)
}
#[allow(clippy::too_many_arguments)]
pub fn compute_output(
output_formula: &OutputFormula,
inputs: &HashMap<String, f32>,
@ -130,7 +128,6 @@ fn output_formula_on_death(
0.0
}
#[allow(clippy::too_many_arguments)]
fn output_formula_logic(
logic: &Logic,
inputs: &HashMap<String, f32>,

View File

@ -147,7 +147,6 @@ fn dispatch_action_set_light(
}
}
#[allow(clippy::too_many_arguments)]
fn dispatch_action_set_block(
coord: vek::Vec3<i32>,
block: Block,

View File

@ -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,
(

View File

@ -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,
(

View File

@ -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 {

View File

@ -7,7 +7,6 @@ use common::states::utils::StageSection;
pub struct ShockwaveAnimation;
impl Animation for ShockwaveAnimation {
#[allow(clippy::type_complexity)]
type Dependency<'a> = (Option<StageSection>, bool);
type Skeleton = BirdLargeSkeleton;

View File

@ -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;

View File

@ -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>,

View File

@ -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>, f32, Option<StageSection>, Vec3<f32>);
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>,

View File

@ -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>,

View File

@ -135,7 +135,6 @@ pub fn compute_matrices<S: Skeleton>(
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<f32>, &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,

View File

@ -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,

View File

@ -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);

View File

@ -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 {

View File

@ -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,

View File

@ -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>) -> Self::Event {
common_base::prof_span!("Chat::update");

View File

@ -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,

View File

@ -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<Info<'a>>,
bubble: Option<&'a SpeechBubble>,

View File

@ -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>) -> Self::Event {
common_base::prof_span!("Popup::update");
let widget::UpdateArgs { state, ui, .. } = args;

View File

@ -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,

View File

@ -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,

View File

@ -224,7 +224,6 @@ fn calc_light<V: RectRasterableVol<Vox = Block> + ReadVol + Debug>(
}
}
#[allow(clippy::many_single_char_names)]
#[allow(clippy::type_complexity)]
pub fn generate_mesh<'a, V: RectRasterableVol<Vox = Block> + ReadVol + Debug + 'static>(
vol: &'a VolGrid2d<V>,

View File

@ -209,7 +209,6 @@ pub enum ShadowMode {
Cheap,
}
#[allow(clippy::derivable_impls)]
impl Default for ShadowMode {
fn default() -> Self { ShadowMode::Map(Default::default()) }
}

View File

@ -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<f32>,
uv_rect: Aabr<f32>,

View File

@ -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>,

View File

@ -376,7 +376,6 @@ pub struct SpriteRenderContext {
pub type SpriteRenderContextLazy = Box<dyn FnMut(&mut Renderer) -> 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();

View File

@ -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(

View File

@ -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,

View File

@ -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

View File

@ -21,7 +21,6 @@ pub struct KeyedJobs<K, V> {
const KEYEDJOBS_GC_INTERVAL: Duration = Duration::from_secs(1);
impl<K: Hash + Eq + Send + Sync + 'static + Clone, V: Send + Sync + 'static> KeyedJobs<K, V> {
#[allow(clippy::new_without_default)]
pub fn new(name: &'static str) -> Self {
let (tx, rx) = crossbeam_channel::unbounded();
Self {

View File

@ -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

View File

@ -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<u32>) -> 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;

View File

@ -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,

View File

@ -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,

View File

@ -147,7 +147,6 @@ impl PackingFormula for TallPacking {
#[inline(always)]
fn dimensions(&self, dims: Vec3<u32>) -> (u32, u32) { (dims.x, dims.y * dims.z) }
#[allow(clippy::many_single_char_names)]
#[inline(always)]
fn index(&self, dims: Vec3<u32>, 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<u8>, [usize; 3]);
#[allow(clippy::type_complexity)]
type Workspace = (
ImageBuffer<image::Luma<u8>, Vec<u8>>,
ImageBuffer<image::Luma<u8>, Vec<u8>>,
@ -592,9 +590,7 @@ impl<P: RTreeParams> NearestNeighbor for RTree<ColorPoint, P> {
pub struct PaletteEncoding<'a, NN: NearestNeighbor, const N: u32>(&'a HashMap<BlockKind, NN>);
impl<'a, NN: NearestNeighbor, const N: u32> VoxelImageEncoding for PaletteEncoding<'a, NN, N> {
#[allow(clippy::type_complexity)]
type Output = CompressedData<(Vec<u8>, [usize; 4])>;
#[allow(clippy::type_complexity)]
type Workspace = (
ImageBuffer<image::Luma<u8>, Vec<u8>>,
ImageBuffer<image::Luma<u8>, Vec<u8>>,
@ -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<Vec<u8>, usize>, dictionary: &mut Vec<u8>) {
let mut tmp: Vec<(Vec<u8>, usize)> = histogram.iter().map(|(k, v)| (k.clone(), *v)).collect();
tmp.sort_by_key(|(_, count)| *count);

View File

@ -67,8 +67,6 @@ impl<'a> Sampler<'a> for ColumnGen<'a> {
type Index = (Vec2<i32>, IndexRef<'a>);
type Sample = Option<ColumnSample<'a>>;
#[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<ColumnSample<'a>> {
let wposf = wpos.map(|e| e as f64);
let chunk_pos = wpos.map2(TerrainChunkSize::RECT_SIZE, |e, sz: u32| e / sz as i32);

View File

@ -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,

View File

@ -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

View File

@ -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<F: fmt::Debug + Float + Sync + Into<Compute>>(
map_size_lg: MapSizeLg,
@ -2534,8 +2531,6 @@ pub fn get_multi_rec<F: fmt::Debug + Float + Sync + Into<Compute>>(
}
/// 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,

View File

@ -20,7 +20,6 @@ pub trait Archetype {
where
Self: Sized;
#[allow(clippy::too_many_arguments)]
fn draw(
&self,
index: IndexRef,

View File

@ -208,7 +208,6 @@ impl Settlement {
pub fn get_origin(&self) -> Vec2<i32> { 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;

View File

@ -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,