mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Merge branch 'aweinstock/resolve-clippy-lints' into 'master'
Globally allow more clippy lints and reconfigure complexity to be less verbose See merge request veloren/veloren!3052
This commit is contained in:
commit
72e270368d
22
clippy.toml
Normal file
22
clippy.toml
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
# TODO: do we want to use `#[deny(clippy::disallowed_method)]` to disallow all unwraps (possibly only in non-test code)?
|
||||||
|
#disallowed-methods = [
|
||||||
|
# "std::option::Option::unwrap",
|
||||||
|
# "std::result::Result::unwrap",
|
||||||
|
#]
|
||||||
|
|
||||||
|
# The `too_many_arguments`, `many_single_char_names`, and `type_complexity`
|
||||||
|
# lints give sufficiently many false positives that they're worth disabling
|
||||||
|
# globally via raising their thresholds.
|
||||||
|
|
||||||
|
# `too_many_arguments` often flags `new` methods on structs that legitimately
|
||||||
|
# ought to have many parameters
|
||||||
|
too-many-arguments-threshold = 15
|
||||||
|
|
||||||
|
# `many_single_char_names` often triggers for geometry or physics code with an
|
||||||
|
# associated diagram, where the short names are points in the diagram.
|
||||||
|
single-char-binding-names-threshold = 8
|
||||||
|
|
||||||
|
# `type_complexity` often triggers for the RHS of an associated type: it's
|
||||||
|
# telling you that a type is complicated enough to need a name, at the point
|
||||||
|
# where you're giving it a name.
|
||||||
|
type-complexity-threshold = 750
|
@ -190,7 +190,6 @@ pub struct QuadPngEncoding<const RESOLUTION_DIVIDER: u32>();
|
|||||||
|
|
||||||
impl<const N: u32> VoxelImageEncoding for QuadPngEncoding<N> {
|
impl<const N: u32> VoxelImageEncoding for QuadPngEncoding<N> {
|
||||||
type Output = CompressedData<(Vec<u8>, [usize; 3])>;
|
type Output = CompressedData<(Vec<u8>, [usize; 3])>;
|
||||||
#[allow(clippy::type_complexity)]
|
|
||||||
type Workspace = (
|
type Workspace = (
|
||||||
ImageBuffer<image::Luma<u8>, Vec<u8>>,
|
ImageBuffer<image::Luma<u8>, Vec<u8>>,
|
||||||
ImageBuffer<image::Luma<u8>, Vec<u8>>,
|
ImageBuffer<image::Luma<u8>, Vec<u8>>,
|
||||||
@ -464,9 +463,7 @@ impl<const N: u32> VoxelImageDecoding for QuadPngEncoding<N> {
|
|||||||
pub struct TriPngEncoding<const AVERAGE_PALETTE: bool>();
|
pub struct TriPngEncoding<const AVERAGE_PALETTE: bool>();
|
||||||
|
|
||||||
impl<const AVERAGE_PALETTE: bool> VoxelImageEncoding for TriPngEncoding<AVERAGE_PALETTE> {
|
impl<const AVERAGE_PALETTE: bool> VoxelImageEncoding for TriPngEncoding<AVERAGE_PALETTE> {
|
||||||
#[allow(clippy::type_complexity)]
|
|
||||||
type Output = CompressedData<(Vec<u8>, Vec<Rgb<u8>>, [usize; 3])>;
|
type Output = CompressedData<(Vec<u8>, Vec<Rgb<u8>>, [usize; 3])>;
|
||||||
#[allow(clippy::type_complexity)]
|
|
||||||
type Workspace = (
|
type Workspace = (
|
||||||
ImageBuffer<image::Luma<u8>, Vec<u8>>,
|
ImageBuffer<image::Luma<u8>, Vec<u8>>,
|
||||||
ImageBuffer<image::Luma<u8>, Vec<u8>>,
|
ImageBuffer<image::Luma<u8>, Vec<u8>>,
|
||||||
|
@ -137,7 +137,7 @@ pub struct CompSyncPackage<P: CompPacket> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl<P: CompPacket> CompSyncPackage<P> {
|
impl<P: CompPacket> CompSyncPackage<P> {
|
||||||
#[allow(clippy::new_without_default)] // TODO: Pending review in #587
|
#[allow(clippy::new_without_default)]
|
||||||
pub fn new() -> Self {
|
pub fn new() -> Self {
|
||||||
Self {
|
Self {
|
||||||
comp_updates: Vec::new(),
|
comp_updates: Vec::new(),
|
||||||
|
@ -176,7 +176,6 @@ impl Attack {
|
|||||||
1.0 - (1.0 - damage_reduction) * (1.0 - block_reduction)
|
1.0 - (1.0 - damage_reduction) * (1.0 - block_reduction)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(clippy::too_many_arguments)]
|
|
||||||
pub fn apply_attack(
|
pub fn apply_attack(
|
||||||
&self,
|
&self,
|
||||||
attacker: Option<AttackerInfo>,
|
attacker: Option<AttackerInfo>,
|
||||||
|
@ -459,7 +459,6 @@ impl Timer {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(clippy::type_complexity)]
|
|
||||||
#[derive(Clone, Debug)]
|
#[derive(Clone, Debug)]
|
||||||
pub struct Agent {
|
pub struct Agent {
|
||||||
pub rtsim_controller: RtSimController,
|
pub rtsim_controller: RtSimController,
|
||||||
@ -533,7 +532,6 @@ impl Agent {
|
|||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(clippy::type_complexity)]
|
|
||||||
#[must_use]
|
#[must_use]
|
||||||
pub fn with_position_pid_controller(
|
pub fn with_position_pid_controller(
|
||||||
mut self,
|
mut self,
|
||||||
|
@ -155,7 +155,6 @@ impl GroupManager {
|
|||||||
|
|
||||||
// Add someone to a group
|
// Add someone to a group
|
||||||
// Also used to create new groups
|
// Also used to create new groups
|
||||||
#[allow(clippy::too_many_arguments)] // TODO: Pending review in #587
|
|
||||||
pub fn add_group_member(
|
pub fn add_group_member(
|
||||||
&mut self,
|
&mut self,
|
||||||
leader: specs::Entity,
|
leader: specs::Entity,
|
||||||
@ -257,7 +256,6 @@ impl GroupManager {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(clippy::too_many_arguments)] // TODO: Pending review in #587
|
|
||||||
pub fn new_pet(
|
pub fn new_pet(
|
||||||
&mut self,
|
&mut self,
|
||||||
pet: specs::Entity,
|
pet: specs::Entity,
|
||||||
@ -336,7 +334,6 @@ impl GroupManager {
|
|||||||
// Remove someone from a group if they are in one
|
// Remove someone from a group if they are in one
|
||||||
// Don't need to check if they are in a group before calling this
|
// Don't need to check if they are in a group before calling this
|
||||||
// Also removes pets (ie call this if the pet no longer exists)
|
// Also removes pets (ie call this if the pet no longer exists)
|
||||||
#[allow(clippy::too_many_arguments)] // TODO: Pending review in #587
|
|
||||||
fn remove_from_group(
|
fn remove_from_group(
|
||||||
&mut self,
|
&mut self,
|
||||||
member: specs::Entity,
|
member: specs::Entity,
|
||||||
|
@ -107,7 +107,6 @@ pub enum ServerEvent {
|
|||||||
},
|
},
|
||||||
UpdateCharacterData {
|
UpdateCharacterData {
|
||||||
entity: EcsEntity,
|
entity: EcsEntity,
|
||||||
#[allow(clippy::type_complexity)]
|
|
||||||
components: (
|
components: (
|
||||||
comp::Body,
|
comp::Body,
|
||||||
comp::Stats,
|
comp::Stats,
|
||||||
|
@ -113,7 +113,7 @@ impl Segment {
|
|||||||
pub struct DynaUnionizer<V: Vox>(Vec<(Dyna<V, ()>, Vec3<i32>)>);
|
pub struct DynaUnionizer<V: Vox>(Vec<(Dyna<V, ()>, Vec3<i32>)>);
|
||||||
|
|
||||||
impl<V: Vox + Copy> DynaUnionizer<V> {
|
impl<V: Vox + Copy> DynaUnionizer<V> {
|
||||||
#[allow(clippy::new_without_default)] // TODO: Pending review in #587
|
#[allow(clippy::new_without_default)]
|
||||||
pub fn new() -> Self { DynaUnionizer(Vec::new()) }
|
pub fn new() -> Self { DynaUnionizer(Vec::new()) }
|
||||||
|
|
||||||
#[must_use]
|
#[must_use]
|
||||||
|
@ -24,7 +24,6 @@ pub struct Recipe {
|
|||||||
pub craft_sprite: Option<SpriteKind>,
|
pub craft_sprite: Option<SpriteKind>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(clippy::type_complexity)]
|
|
||||||
impl Recipe {
|
impl Recipe {
|
||||||
/// Perform a recipe, returning a list of missing items on failure
|
/// Perform a recipe, returning a list of missing items on failure
|
||||||
pub fn craft_simple(
|
pub fn craft_simple(
|
||||||
|
@ -13,6 +13,7 @@ pub enum Event {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Region consisting of a bitset of entities within it
|
/// Region consisting of a bitset of entities within it
|
||||||
|
#[derive(Default)]
|
||||||
pub struct Region {
|
pub struct Region {
|
||||||
// Use specs bitset for simplicity (and joinability)
|
// Use specs bitset for simplicity (and joinability)
|
||||||
bitset: BitSet,
|
bitset: BitSet,
|
||||||
@ -23,14 +24,6 @@ pub struct Region {
|
|||||||
events: Vec<Event>,
|
events: Vec<Event>,
|
||||||
}
|
}
|
||||||
impl Region {
|
impl Region {
|
||||||
fn new() -> Self {
|
|
||||||
Self {
|
|
||||||
bitset: BitSet::new(),
|
|
||||||
neighbors: [None; 8],
|
|
||||||
events: Vec::new(),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Checks if the region contains no entities and no events
|
/// Checks if the region contains no entities and no events
|
||||||
fn removable(&self) -> bool { self.bitset.is_empty() && self.events.is_empty() }
|
fn removable(&self) -> bool { self.bitset.is_empty() && self.events.is_empty() }
|
||||||
|
|
||||||
@ -70,6 +63,7 @@ const NEIGHBOR_OFFSETS: [Vec2<i32>; 8] = [
|
|||||||
Vec2::new(1, 1),
|
Vec2::new(1, 1),
|
||||||
];
|
];
|
||||||
|
|
||||||
|
#[derive(Default)]
|
||||||
// TODO generic region size (16x16 for now)
|
// TODO generic region size (16x16 for now)
|
||||||
// TODO compare to sweep and prune approach
|
// TODO compare to sweep and prune approach
|
||||||
/// A region system that tracks where entities are
|
/// A region system that tracks where entities are
|
||||||
@ -87,20 +81,11 @@ pub struct RegionMap {
|
|||||||
// (region, entity)
|
// (region, entity)
|
||||||
entities_to_remove: Vec<(usize, u32)>,
|
entities_to_remove: Vec<(usize, u32)>,
|
||||||
// Track the current tick, used to enable not checking everything every tick
|
// Track the current tick, used to enable not checking everything every tick
|
||||||
|
// rate is dependent on the rate the caller calls region_manager.tick()
|
||||||
tick: u64,
|
tick: u64,
|
||||||
}
|
}
|
||||||
impl RegionMap {
|
impl RegionMap {
|
||||||
#[allow(clippy::new_without_default)] // TODO: Pending review in #587
|
pub fn new() -> Self { Self::default() }
|
||||||
pub fn new() -> Self {
|
|
||||||
Self {
|
|
||||||
regions: IndexMap::default(),
|
|
||||||
tracked_entities: BitSet::new(),
|
|
||||||
entities_to_move: Vec::new(),
|
|
||||||
entities_to_remove: Vec::new(),
|
|
||||||
// rate is dependent on the rate the caller calls region_manager.tick()
|
|
||||||
tick: 0,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO maintain within a system?
|
// TODO maintain within a system?
|
||||||
// TODO special case large entities
|
// TODO special case large entities
|
||||||
@ -269,7 +254,7 @@ impl RegionMap {
|
|||||||
/// Adds a new region
|
/// Adds a new region
|
||||||
/// Returns the index of the region in the index map
|
/// Returns the index of the region in the index map
|
||||||
fn insert(&mut self, key: Vec2<i32>) -> usize {
|
fn insert(&mut self, key: Vec2<i32>) -> usize {
|
||||||
let (index, old_region) = self.regions.insert_full(key, Region::new());
|
let (index, old_region) = self.regions.insert_full(key, Region::default());
|
||||||
if old_region.is_some() {
|
if old_region.is_some() {
|
||||||
panic!("Inserted a region that already exists!!!(this should never need to occur");
|
panic!("Inserted a region that already exists!!!(this should never need to occur");
|
||||||
}
|
}
|
||||||
|
@ -9,20 +9,22 @@ pub struct Spiral2d {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl Spiral2d {
|
impl Spiral2d {
|
||||||
#[allow(clippy::new_without_default)] // TODO: Pending review in #587
|
#[allow(clippy::new_without_default)]
|
||||||
/// Creates a new spiral starting at the origin
|
/// Creates a new spiral starting at the origin
|
||||||
pub fn new() -> Self { Self { layer: 0, i: 0 } }
|
pub fn new() -> Self { Self { layer: 0, i: 0 } }
|
||||||
|
|
||||||
/// Creates an iterator over points in a spiral starting at the origin and
|
/// Creates an iterator over points in a spiral starting at the origin and
|
||||||
/// going out to some radius
|
/// going out to some radius
|
||||||
pub fn radius(self, radius: i32) -> impl Iterator<Item = Vec2<i32>> {
|
pub fn with_radius(radius: i32) -> impl Iterator<Item = Vec2<i32>> {
|
||||||
self.take((radius * 2 + 1).pow(2) as usize)
|
Self::new()
|
||||||
|
.take((radius * 2 + 1).pow(2) as usize)
|
||||||
.filter(move |pos| pos.magnitude_squared() < (radius + 1).pow(2))
|
.filter(move |pos| pos.magnitude_squared() < (radius + 1).pow(2))
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Creates an iterator over points in the edge of a circle of some radius
|
/// Creates an iterator over points in the edge of a circle of some radius
|
||||||
pub fn edge_radius(self, radius: i32) -> impl Iterator<Item = Vec2<i32>> {
|
pub fn with_edge_radius(radius: i32) -> impl Iterator<Item = Vec2<i32>> {
|
||||||
self.take((radius * 2 + 1).pow(2) as usize)
|
Self::new()
|
||||||
|
.take((radius * 2 + 1).pow(2) as usize)
|
||||||
.filter(move |pos| pos.magnitude_squared() < (radius + 1).pow(2))
|
.filter(move |pos| pos.magnitude_squared() < (radius + 1).pow(2))
|
||||||
.filter(move |pos| pos.magnitude_squared() >= radius.pow(2))
|
.filter(move |pos| pos.magnitude_squared() >= radius.pow(2))
|
||||||
}
|
}
|
||||||
|
@ -85,7 +85,7 @@ impl CharacterBehavior for Data {
|
|||||||
// 1 added to make range correct, too lazy to add 1 to both variables above
|
// 1 added to make range correct, too lazy to add 1 to both variables above
|
||||||
let radius = radius + 1;
|
let radius = radius + 1;
|
||||||
// Creates a spiral iterator for the newly achieved radius
|
// Creates a spiral iterator for the newly achieved radius
|
||||||
let spiral = Spiral2d::new().edge_radius(radius);
|
let spiral = Spiral2d::with_edge_radius(radius);
|
||||||
for point in spiral {
|
for point in spiral {
|
||||||
// If square is not sparse, generate sprite
|
// If square is not sparse, generate sprite
|
||||||
if !thread_rng().gen_bool(self.static_data.sparseness) {
|
if !thread_rng().gen_bool(self.static_data.sparseness) {
|
||||||
|
@ -245,7 +245,6 @@ impl<V, S: RectVolSize, M: Clone> Iterator for ChonkIterHelper<V, S, M> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(clippy::type_complexity)] // TODO: Pending review in #587
|
|
||||||
pub struct ChonkPosIter<V, S: RectVolSize, M: Clone> {
|
pub struct ChonkPosIter<V, S: RectVolSize, M: Clone> {
|
||||||
outer: ChonkIterHelper<V, S, M>,
|
outer: ChonkIterHelper<V, S, M>,
|
||||||
opt_inner: Option<(i32, ChunkPosIter<V, SubChunkSize<S>, M>)>,
|
opt_inner: Option<(i32, ChunkPosIter<V, SubChunkSize<S>, M>)>,
|
||||||
|
@ -91,7 +91,6 @@ pub struct TerrainChunkMeta {
|
|||||||
contains_dungeon: bool,
|
contains_dungeon: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(clippy::too_many_arguments)]
|
|
||||||
impl TerrainChunkMeta {
|
impl TerrainChunkMeta {
|
||||||
pub fn new(
|
pub fn new(
|
||||||
name: Option<String>,
|
name: Option<String>,
|
||||||
|
@ -98,7 +98,6 @@ pub trait ReadVol: BaseVol {
|
|||||||
/// Get a reference to the voxel at the provided position in the volume.
|
/// Get a reference to the voxel at the provided position in the volume.
|
||||||
fn get(&self, pos: Vec3<i32>) -> Result<&Self::Vox, Self::Error>;
|
fn get(&self, pos: Vec3<i32>) -> Result<&Self::Vox, Self::Error>;
|
||||||
|
|
||||||
#[allow(clippy::type_complexity)] // TODO: Pending review in #587
|
|
||||||
/// NOTE: By default, this ray will simply run from `from` to `to` without
|
/// NOTE: By default, this ray will simply run from `from` to `to` without
|
||||||
/// stopping. To make something interesting happen, call `until` or
|
/// stopping. To make something interesting happen, call `until` or
|
||||||
/// `for_each`.
|
/// `for_each`.
|
||||||
|
@ -310,7 +310,6 @@ impl<'a> System<'a> for Sys {
|
|||||||
|
|
||||||
/// Assumes upright cylinder
|
/// Assumes upright cylinder
|
||||||
/// See page 12 of https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.396.7952&rep=rep1&type=pdf
|
/// See page 12 of https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.396.7952&rep=rep1&type=pdf
|
||||||
#[allow(clippy::too_many_arguments)]
|
|
||||||
fn sphere_wedge_cylinder_collision(
|
fn sphere_wedge_cylinder_collision(
|
||||||
// Values for spherical wedge
|
// Values for spherical wedge
|
||||||
real_pos: Vec3<f32>,
|
real_pos: Vec3<f32>,
|
||||||
|
@ -57,7 +57,6 @@ pub struct ReadData<'a> {
|
|||||||
pub struct Sys;
|
pub struct Sys;
|
||||||
|
|
||||||
impl<'a> System<'a> for Sys {
|
impl<'a> System<'a> for Sys {
|
||||||
#[allow(clippy::type_complexity)]
|
|
||||||
type SystemData = (
|
type SystemData = (
|
||||||
ReadData<'a>,
|
ReadData<'a>,
|
||||||
WriteStorage<'a, CharacterState>,
|
WriteStorage<'a, CharacterState>,
|
||||||
|
@ -15,7 +15,6 @@ use vek::*;
|
|||||||
#[derive(Default)]
|
#[derive(Default)]
|
||||||
pub struct Sys;
|
pub struct Sys;
|
||||||
impl<'a> System<'a> for Sys {
|
impl<'a> System<'a> for Sys {
|
||||||
#[allow(clippy::type_complexity)]
|
|
||||||
type SystemData = (
|
type SystemData = (
|
||||||
Read<'a, UidAllocator>,
|
Read<'a, UidAllocator>,
|
||||||
Entities<'a>,
|
Entities<'a>,
|
||||||
|
@ -41,7 +41,6 @@ fn fluid_density(height: f32, fluid: &Fluid) -> Density {
|
|||||||
Density(fluid.density().0 * immersion + AIR_DENSITY * (1.0 - immersion))
|
Density(fluid.density().0 * immersion + AIR_DENSITY * (1.0 - immersion))
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(clippy::too_many_arguments)]
|
|
||||||
fn integrate_forces(
|
fn integrate_forces(
|
||||||
dt: &DeltaTime,
|
dt: &DeltaTime,
|
||||||
mut vel: Vel,
|
mut vel: Vel,
|
||||||
@ -1319,7 +1318,7 @@ impl<'a> System<'a> for Sys {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(clippy::too_many_arguments, clippy::too_many_lines)]
|
#[allow(clippy::too_many_lines)]
|
||||||
fn box_voxel_collision<'a, T: BaseVol<Vox = Block> + ReadVol>(
|
fn box_voxel_collision<'a, T: BaseVol<Vox = Block> + ReadVol>(
|
||||||
cylinder: (f32, f32, f32), // effective collision cylinder
|
cylinder: (f32, f32, f32), // effective collision cylinder
|
||||||
terrain: &'a T,
|
terrain: &'a T,
|
||||||
@ -1944,8 +1943,6 @@ fn projection_between(c0: ColliderContext, c1: ColliderContext) -> (Vec2<f32>, f
|
|||||||
/// unspecified pair of points that sit on the line segments will be chosen.
|
/// unspecified pair of points that sit on the line segments will be chosen.
|
||||||
fn closest_points(n: LineSegment2<f32>, m: LineSegment2<f32>) -> (Vec2<f32>, Vec2<f32>) {
|
fn closest_points(n: LineSegment2<f32>, m: LineSegment2<f32>) -> (Vec2<f32>, Vec2<f32>) {
|
||||||
// TODO: Rewrite this to something reasonable, if you have faith
|
// TODO: Rewrite this to something reasonable, if you have faith
|
||||||
#![allow(clippy::many_single_char_names)]
|
|
||||||
|
|
||||||
let a = n.start;
|
let a = n.start;
|
||||||
let b = n.end - n.start;
|
let b = n.end - n.start;
|
||||||
let c = m.start;
|
let c = m.start;
|
||||||
|
@ -34,7 +34,6 @@ pub struct ReadData<'a> {
|
|||||||
#[derive(Default)]
|
#[derive(Default)]
|
||||||
pub struct Sys;
|
pub struct Sys;
|
||||||
impl<'a> System<'a> for Sys {
|
impl<'a> System<'a> for Sys {
|
||||||
#[allow(clippy::type_complexity)]
|
|
||||||
type SystemData = (
|
type SystemData = (
|
||||||
ReadData<'a>,
|
ReadData<'a>,
|
||||||
WriteStorage<'a, Stats>,
|
WriteStorage<'a, Stats>,
|
||||||
|
@ -760,7 +760,6 @@ impl Participant {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl Stream {
|
impl Stream {
|
||||||
#[allow(clippy::too_many_arguments)]
|
|
||||||
pub(crate) fn new(
|
pub(crate) fn new(
|
||||||
local_pid: Pid,
|
local_pid: Pid,
|
||||||
remote_pid: Pid,
|
remote_pid: Pid,
|
||||||
|
@ -85,7 +85,6 @@ impl BParticipant {
|
|||||||
const TICK_TIME: Duration = Duration::from_millis(Self::TICK_TIME_MS);
|
const TICK_TIME: Duration = Duration::from_millis(Self::TICK_TIME_MS);
|
||||||
const TICK_TIME_MS: u64 = 5;
|
const TICK_TIME_MS: u64 = 5;
|
||||||
|
|
||||||
#[allow(clippy::type_complexity)]
|
|
||||||
pub(crate) fn new(
|
pub(crate) fn new(
|
||||||
local_pid: Pid,
|
local_pid: Pid,
|
||||||
remote_pid: Pid,
|
remote_pid: Pid,
|
||||||
@ -223,7 +222,6 @@ impl BParticipant {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//TODO: local stream_cid: HashMap<Sid, Cid> to know the respective protocol
|
//TODO: local stream_cid: HashMap<Sid, Cid> to know the respective protocol
|
||||||
#[allow(clippy::too_many_arguments)]
|
|
||||||
async fn send_mgr(
|
async fn send_mgr(
|
||||||
&self,
|
&self,
|
||||||
mut a2b_open_stream_r: mpsc::UnboundedReceiver<A2bStreamOpen>,
|
mut a2b_open_stream_r: mpsc::UnboundedReceiver<A2bStreamOpen>,
|
||||||
@ -781,7 +779,6 @@ mod tests {
|
|||||||
task::JoinHandle,
|
task::JoinHandle,
|
||||||
};
|
};
|
||||||
|
|
||||||
#[allow(clippy::type_complexity)]
|
|
||||||
fn mock_bparticipant() -> (
|
fn mock_bparticipant() -> (
|
||||||
Arc<Runtime>,
|
Arc<Runtime>,
|
||||||
mpsc::UnboundedSender<A2bStreamOpen>,
|
mpsc::UnboundedSender<A2bStreamOpen>,
|
||||||
|
@ -44,7 +44,6 @@ impl Component for Client {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl Client {
|
impl Client {
|
||||||
#[allow(clippy::too_many_arguments)]
|
|
||||||
pub(crate) fn new(
|
pub(crate) fn new(
|
||||||
client_type: ClientType,
|
client_type: ClientType,
|
||||||
participant: Participant,
|
participant: Participant,
|
||||||
|
@ -30,7 +30,6 @@ pub fn handle_initialize_character(
|
|||||||
server.state.initialize_character_data(entity, character_id);
|
server.state.initialize_character_data(entity, character_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(clippy::type_complexity)]
|
|
||||||
pub fn handle_loaded_character_data(
|
pub fn handle_loaded_character_data(
|
||||||
server: &mut Server,
|
server: &mut Server,
|
||||||
entity: EcsEntity,
|
entity: EcsEntity,
|
||||||
@ -42,7 +41,6 @@ pub fn handle_loaded_character_data(
|
|||||||
sys::subscription::initialize_region_subscription(server.state.ecs(), entity);
|
sys::subscription::initialize_region_subscription(server.state.ecs(), entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(clippy::too_many_arguments)] // TODO: Pending review in #587
|
|
||||||
pub fn handle_create_npc(
|
pub fn handle_create_npc(
|
||||||
server: &mut Server,
|
server: &mut Server,
|
||||||
pos: Pos,
|
pos: Pos,
|
||||||
@ -161,7 +159,6 @@ pub fn handle_create_ship(
|
|||||||
entity.build();
|
entity.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(clippy::too_many_arguments)]
|
|
||||||
pub fn handle_shoot(
|
pub fn handle_shoot(
|
||||||
server: &mut Server,
|
server: &mut Server,
|
||||||
entity: EcsEntity,
|
entity: EcsEntity,
|
||||||
|
@ -16,7 +16,6 @@ use std::sync::Arc;
|
|||||||
#[derive(Default)]
|
#[derive(Default)]
|
||||||
pub struct Sys;
|
pub struct Sys;
|
||||||
impl<'a> System<'a> for Sys {
|
impl<'a> System<'a> for Sys {
|
||||||
#[allow(clippy::type_complexity)]
|
|
||||||
type SystemData = (
|
type SystemData = (
|
||||||
Read<'a, Time>,
|
Read<'a, Time>,
|
||||||
Read<'a, DeltaTime>,
|
Read<'a, DeltaTime>,
|
||||||
|
@ -10,7 +10,6 @@ use specs::{Entities, Read, ReadExpect, ReadStorage, WriteExpect};
|
|||||||
#[derive(Default)]
|
#[derive(Default)]
|
||||||
pub struct Sys;
|
pub struct Sys;
|
||||||
impl<'a> System<'a> for Sys {
|
impl<'a> System<'a> for Sys {
|
||||||
#[allow(clippy::type_complexity)]
|
|
||||||
type SystemData = (
|
type SystemData = (
|
||||||
Read<'a, EventBus<ServerEvent>>,
|
Read<'a, EventBus<ServerEvent>>,
|
||||||
WriteExpect<'a, RtSim>,
|
WriteExpect<'a, RtSim>,
|
||||||
|
@ -42,7 +42,6 @@ pub trait StateExt {
|
|||||||
/// Updates a component associated with the entity based on the `Effect`
|
/// Updates a component associated with the entity based on the `Effect`
|
||||||
fn apply_effect(&self, entity: EcsEntity, effect: Effect, source: Option<Uid>);
|
fn apply_effect(&self, entity: EcsEntity, effect: Effect, source: Option<Uid>);
|
||||||
/// Build a non-player character
|
/// Build a non-player character
|
||||||
#[allow(clippy::too_many_arguments)]
|
|
||||||
fn create_npc(
|
fn create_npc(
|
||||||
&mut self,
|
&mut self,
|
||||||
pos: comp::Pos,
|
pos: comp::Pos,
|
||||||
|
@ -66,7 +66,6 @@ use vek::*;
|
|||||||
#[derive(Default)]
|
#[derive(Default)]
|
||||||
pub struct Sys;
|
pub struct Sys;
|
||||||
impl<'a> System<'a> for Sys {
|
impl<'a> System<'a> for Sys {
|
||||||
#[allow(clippy::type_complexity)]
|
|
||||||
type SystemData = (
|
type SystemData = (
|
||||||
ReadData<'a>,
|
ReadData<'a>,
|
||||||
Write<'a, EventBus<ServerEvent>>,
|
Write<'a, EventBus<ServerEvent>>,
|
||||||
@ -2178,7 +2177,6 @@ impl<'a> AgentData<'a> {
|
|||||||
/// multiplies the movement speed by a value less than 1.0.
|
/// multiplies the movement speed by a value less than 1.0.
|
||||||
/// A `None` value implies a multiplier of 1.0.
|
/// A `None` value implies a multiplier of 1.0.
|
||||||
/// Returns `false` if the pathfinding algorithm fails to return a path
|
/// Returns `false` if the pathfinding algorithm fails to return a path
|
||||||
#[allow(clippy::too_many_arguments)]
|
|
||||||
fn path_toward_target(
|
fn path_toward_target(
|
||||||
&self,
|
&self,
|
||||||
agent: &mut Agent,
|
agent: &mut Agent,
|
||||||
|
@ -11,7 +11,6 @@ use std::time::Instant;
|
|||||||
#[derive(Default)]
|
#[derive(Default)]
|
||||||
pub struct Sys;
|
pub struct Sys;
|
||||||
impl<'a> System<'a> for Sys {
|
impl<'a> System<'a> for Sys {
|
||||||
#[allow(clippy::type_complexity)]
|
|
||||||
type SystemData = (
|
type SystemData = (
|
||||||
Option<Entities<'a>>,
|
Option<Entities<'a>>,
|
||||||
ReadExpect<'a, HwStats>,
|
ReadExpect<'a, HwStats>,
|
||||||
|
@ -18,7 +18,6 @@ use std::sync::atomic::Ordering;
|
|||||||
use tracing::{debug, warn};
|
use tracing::{debug, warn};
|
||||||
|
|
||||||
impl Sys {
|
impl Sys {
|
||||||
#[allow(clippy::too_many_arguments)]
|
|
||||||
fn handle_client_character_screen_msg(
|
fn handle_client_character_screen_msg(
|
||||||
server_emitter: &mut common::event::Emitter<'_, ServerEvent>,
|
server_emitter: &mut common::event::Emitter<'_, ServerEvent>,
|
||||||
entity: specs::Entity,
|
entity: specs::Entity,
|
||||||
@ -186,7 +185,6 @@ impl Sys {
|
|||||||
#[derive(Default)]
|
#[derive(Default)]
|
||||||
pub struct Sys;
|
pub struct Sys;
|
||||||
impl<'a> System<'a> for Sys {
|
impl<'a> System<'a> for Sys {
|
||||||
#[allow(clippy::type_complexity)]
|
|
||||||
type SystemData = (
|
type SystemData = (
|
||||||
Entities<'a>,
|
Entities<'a>,
|
||||||
Read<'a, EventBus<ServerEvent>>,
|
Read<'a, EventBus<ServerEvent>>,
|
||||||
|
@ -67,7 +67,6 @@ impl Sys {
|
|||||||
#[derive(Default)]
|
#[derive(Default)]
|
||||||
pub struct Sys;
|
pub struct Sys;
|
||||||
impl<'a> System<'a> for Sys {
|
impl<'a> System<'a> for Sys {
|
||||||
#[allow(clippy::type_complexity)]
|
|
||||||
type SystemData = (
|
type SystemData = (
|
||||||
Entities<'a>,
|
Entities<'a>,
|
||||||
Read<'a, EventBus<ServerEvent>>,
|
Read<'a, EventBus<ServerEvent>>,
|
||||||
|
@ -22,7 +22,6 @@ impl Sys {
|
|||||||
#[derive(Default)]
|
#[derive(Default)]
|
||||||
pub struct Sys;
|
pub struct Sys;
|
||||||
impl<'a> System<'a> for Sys {
|
impl<'a> System<'a> for Sys {
|
||||||
#[allow(clippy::type_complexity)]
|
|
||||||
type SystemData = (
|
type SystemData = (
|
||||||
Entities<'a>,
|
Entities<'a>,
|
||||||
Read<'a, EventBus<ServerEvent>>,
|
Read<'a, EventBus<ServerEvent>>,
|
||||||
|
@ -15,7 +15,6 @@ use tracing::{debug, trace};
|
|||||||
#[derive(Default)]
|
#[derive(Default)]
|
||||||
pub struct Sys;
|
pub struct Sys;
|
||||||
impl<'a> System<'a> for Sys {
|
impl<'a> System<'a> for Sys {
|
||||||
#[allow(clippy::type_complexity)]
|
|
||||||
type SystemData = (
|
type SystemData = (
|
||||||
Entities<'a>,
|
Entities<'a>,
|
||||||
ReadExpect<'a, TerrainGrid>,
|
ReadExpect<'a, TerrainGrid>,
|
||||||
|
@ -12,7 +12,6 @@ use specs::{Entities, Join, Read, ReadStorage, WriteStorage};
|
|||||||
#[derive(Default)]
|
#[derive(Default)]
|
||||||
pub struct Sys;
|
pub struct Sys;
|
||||||
impl<'a> System<'a> for Sys {
|
impl<'a> System<'a> for Sys {
|
||||||
#[allow(clippy::type_complexity)]
|
|
||||||
type SystemData = (
|
type SystemData = (
|
||||||
Entities<'a>,
|
Entities<'a>,
|
||||||
Read<'a, DeltaTime>,
|
Read<'a, DeltaTime>,
|
||||||
|
@ -14,7 +14,6 @@ use specs::{Join, ReadStorage, Write, WriteExpect};
|
|||||||
pub struct Sys;
|
pub struct Sys;
|
||||||
|
|
||||||
impl<'a> System<'a> for Sys {
|
impl<'a> System<'a> for Sys {
|
||||||
#[allow(clippy::type_complexity)]
|
|
||||||
type SystemData = (
|
type SystemData = (
|
||||||
ReadStorage<'a, Alignment>,
|
ReadStorage<'a, Alignment>,
|
||||||
ReadStorage<'a, Body>,
|
ReadStorage<'a, Body>,
|
||||||
|
@ -12,7 +12,6 @@ use specs::{
|
|||||||
#[derive(Default)]
|
#[derive(Default)]
|
||||||
pub struct Sys;
|
pub struct Sys;
|
||||||
impl<'a> System<'a> for Sys {
|
impl<'a> System<'a> for Sys {
|
||||||
#[allow(clippy::type_complexity)]
|
|
||||||
type SystemData = (
|
type SystemData = (
|
||||||
Entities<'a>,
|
Entities<'a>,
|
||||||
ReadExpect<'a, TerrainGrid>,
|
ReadExpect<'a, TerrainGrid>,
|
||||||
|
@ -22,7 +22,6 @@ use vek::*;
|
|||||||
#[derive(Default)]
|
#[derive(Default)]
|
||||||
pub struct Sys;
|
pub struct Sys;
|
||||||
impl<'a> System<'a> for Sys {
|
impl<'a> System<'a> for Sys {
|
||||||
#[allow(clippy::type_complexity)]
|
|
||||||
type SystemData = (
|
type SystemData = (
|
||||||
Entities<'a>,
|
Entities<'a>,
|
||||||
ReadExpect<'a, RegionMap>,
|
ReadExpect<'a, RegionMap>,
|
||||||
|
@ -106,7 +106,7 @@ impl LazyTerrainMessage {
|
|||||||
#[derive(Default)]
|
#[derive(Default)]
|
||||||
pub struct Sys;
|
pub struct Sys;
|
||||||
impl<'a> System<'a> for Sys {
|
impl<'a> System<'a> for Sys {
|
||||||
#[allow(clippy::type_complexity)] // TODO: Pending review in #587
|
#[allow(clippy::type_complexity)]
|
||||||
type SystemData = (
|
type SystemData = (
|
||||||
Read<'a, EventBus<ServerEvent>>,
|
Read<'a, EventBus<ServerEvent>>,
|
||||||
Read<'a, Tick>,
|
Read<'a, Tick>,
|
||||||
|
@ -11,7 +11,6 @@ use specs::{Join, Read, ReadExpect, ReadStorage};
|
|||||||
#[derive(Default)]
|
#[derive(Default)]
|
||||||
pub struct Sys;
|
pub struct Sys;
|
||||||
impl<'a> System<'a> for Sys {
|
impl<'a> System<'a> for Sys {
|
||||||
#[allow(clippy::type_complexity)]
|
|
||||||
type SystemData = (
|
type SystemData = (
|
||||||
ReadExpect<'a, TerrainGrid>,
|
ReadExpect<'a, TerrainGrid>,
|
||||||
Read<'a, TerrainChanges>,
|
Read<'a, TerrainChanges>,
|
||||||
|
@ -15,7 +15,6 @@ const NOTIFY_TIME: f64 = 10.0;
|
|||||||
#[derive(Default)]
|
#[derive(Default)]
|
||||||
pub struct Sys;
|
pub struct Sys;
|
||||||
impl<'a> System<'a> for Sys {
|
impl<'a> System<'a> for Sys {
|
||||||
#[allow(clippy::type_complexity)]
|
|
||||||
type SystemData = (
|
type SystemData = (
|
||||||
Entities<'a>,
|
Entities<'a>,
|
||||||
ReadStorage<'a, Pos>,
|
ReadStorage<'a, Pos>,
|
||||||
|
@ -68,7 +68,6 @@ pub fn dispatch_actions(system_data: &mut WiringData) {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(clippy::too_many_arguments)]
|
|
||||||
fn dispatch_action(
|
fn dispatch_action(
|
||||||
entity: Entity,
|
entity: Entity,
|
||||||
inputs: &HashMap<String, f32>,
|
inputs: &HashMap<String, f32>,
|
||||||
@ -123,7 +122,6 @@ fn dispatch_action_spawn_projectile(
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(clippy::too_many_arguments)]
|
|
||||||
fn dispatch_action_set_light(
|
fn dispatch_action_set_light(
|
||||||
inputs: &HashMap<String, f32>,
|
inputs: &HashMap<String, f32>,
|
||||||
r: &OutputFormula,
|
r: &OutputFormula,
|
||||||
|
@ -11,7 +11,6 @@ use core::f32::consts::PI;
|
|||||||
pub struct AlphaAnimation;
|
pub struct AlphaAnimation;
|
||||||
|
|
||||||
impl Animation for AlphaAnimation {
|
impl Animation for AlphaAnimation {
|
||||||
#[allow(clippy::type_complexity)]
|
|
||||||
type Dependency<'a> = (
|
type Dependency<'a> = (
|
||||||
(Option<ToolKind>, Option<&'a AbilitySpec>),
|
(Option<ToolKind>, Option<&'a AbilitySpec>),
|
||||||
(Option<ToolKind>, Option<&'a AbilitySpec>),
|
(Option<ToolKind>, Option<&'a AbilitySpec>),
|
||||||
|
@ -11,7 +11,6 @@ use core::f32::consts::PI;
|
|||||||
pub struct BeamAnimation;
|
pub struct BeamAnimation;
|
||||||
|
|
||||||
impl Animation for BeamAnimation {
|
impl Animation for BeamAnimation {
|
||||||
#[allow(clippy::type_complexity)]
|
|
||||||
type Dependency<'a> = (
|
type Dependency<'a> = (
|
||||||
(Option<ToolKind>, Option<&'a AbilitySpec>),
|
(Option<ToolKind>, Option<&'a AbilitySpec>),
|
||||||
(Option<ToolKind>, Option<&'a AbilitySpec>),
|
(Option<ToolKind>, Option<&'a AbilitySpec>),
|
||||||
|
@ -11,7 +11,6 @@ use std::f32::consts::PI;
|
|||||||
pub struct BetaAnimation;
|
pub struct BetaAnimation;
|
||||||
|
|
||||||
impl Animation for BetaAnimation {
|
impl Animation for BetaAnimation {
|
||||||
#[allow(clippy::type_complexity)]
|
|
||||||
type Dependency<'a> = (
|
type Dependency<'a> = (
|
||||||
(Option<ToolKind>, Option<&'a AbilitySpec>),
|
(Option<ToolKind>, Option<&'a AbilitySpec>),
|
||||||
(Option<ToolKind>, Option<&'a AbilitySpec>),
|
(Option<ToolKind>, Option<&'a AbilitySpec>),
|
||||||
|
@ -11,7 +11,6 @@ use core::f32::consts::PI;
|
|||||||
pub struct ChargeMeleeAnimation;
|
pub struct ChargeMeleeAnimation;
|
||||||
|
|
||||||
impl Animation for ChargeMeleeAnimation {
|
impl Animation for ChargeMeleeAnimation {
|
||||||
#[allow(clippy::type_complexity)]
|
|
||||||
type Dependency<'a> = (
|
type Dependency<'a> = (
|
||||||
(Option<ToolKind>, Option<&'a AbilitySpec>),
|
(Option<ToolKind>, Option<&'a AbilitySpec>),
|
||||||
(Option<ToolKind>, Option<&'a AbilitySpec>),
|
(Option<ToolKind>, Option<&'a AbilitySpec>),
|
||||||
|
@ -11,7 +11,6 @@ use core::f32::consts::PI;
|
|||||||
pub struct DashAnimation;
|
pub struct DashAnimation;
|
||||||
|
|
||||||
impl Animation for DashAnimation {
|
impl Animation for DashAnimation {
|
||||||
#[allow(clippy::type_complexity)]
|
|
||||||
type Dependency<'a> = (
|
type Dependency<'a> = (
|
||||||
(Option<ToolKind>, Option<&'a AbilitySpec>),
|
(Option<ToolKind>, Option<&'a AbilitySpec>),
|
||||||
(Option<ToolKind>, Option<&'a AbilitySpec>),
|
(Option<ToolKind>, Option<&'a AbilitySpec>),
|
||||||
|
@ -11,7 +11,6 @@ use core::f32::consts::PI;
|
|||||||
pub struct SelfBuffAnimation;
|
pub struct SelfBuffAnimation;
|
||||||
|
|
||||||
impl Animation for SelfBuffAnimation {
|
impl Animation for SelfBuffAnimation {
|
||||||
#[allow(clippy::type_complexity)]
|
|
||||||
type Dependency<'a> = (
|
type Dependency<'a> = (
|
||||||
(Option<ToolKind>, Option<&'a AbilitySpec>),
|
(Option<ToolKind>, Option<&'a AbilitySpec>),
|
||||||
(Option<ToolKind>, Option<&'a AbilitySpec>),
|
(Option<ToolKind>, Option<&'a AbilitySpec>),
|
||||||
|
@ -11,7 +11,6 @@ use core::f32::consts::PI;
|
|||||||
pub struct StunnedAnimation;
|
pub struct StunnedAnimation;
|
||||||
|
|
||||||
impl Animation for StunnedAnimation {
|
impl Animation for StunnedAnimation {
|
||||||
#[allow(clippy::type_complexity)]
|
|
||||||
type Dependency<'a> = (
|
type Dependency<'a> = (
|
||||||
(Option<ToolKind>, Option<&'a AbilitySpec>),
|
(Option<ToolKind>, Option<&'a AbilitySpec>),
|
||||||
Vec3<f32>,
|
Vec3<f32>,
|
||||||
|
@ -11,7 +11,6 @@ use core::f32::consts::PI;
|
|||||||
pub struct SummonAnimation;
|
pub struct SummonAnimation;
|
||||||
|
|
||||||
impl Animation for SummonAnimation {
|
impl Animation for SummonAnimation {
|
||||||
#[allow(clippy::type_complexity)]
|
|
||||||
type Dependency<'a> = (
|
type Dependency<'a> = (
|
||||||
(Option<ToolKind>, Option<&'a AbilitySpec>),
|
(Option<ToolKind>, Option<&'a AbilitySpec>),
|
||||||
(Option<ToolKind>, Option<&'a AbilitySpec>),
|
(Option<ToolKind>, Option<&'a AbilitySpec>),
|
||||||
|
@ -8,7 +8,6 @@ use core::{f32::consts::PI, ops::Mul};
|
|||||||
pub struct WieldAnimation;
|
pub struct WieldAnimation;
|
||||||
|
|
||||||
impl Animation for WieldAnimation {
|
impl Animation for WieldAnimation {
|
||||||
#[allow(clippy::type_complexity)]
|
|
||||||
type Dependency<'a> = (
|
type Dependency<'a> = (
|
||||||
(Option<ToolKind>, Option<&'a AbilitySpec>),
|
(Option<ToolKind>, Option<&'a AbilitySpec>),
|
||||||
(Option<ToolKind>, Option<&'a AbilitySpec>),
|
(Option<ToolKind>, Option<&'a AbilitySpec>),
|
||||||
|
@ -11,7 +11,6 @@ use std::f32::consts::PI;
|
|||||||
pub struct BeamAnimation;
|
pub struct BeamAnimation;
|
||||||
|
|
||||||
impl Animation for BeamAnimation {
|
impl Animation for BeamAnimation {
|
||||||
#[allow(clippy::type_complexity)]
|
|
||||||
type Dependency<'a> = (
|
type Dependency<'a> = (
|
||||||
Option<AbilityInfo>,
|
Option<AbilityInfo>,
|
||||||
(Option<Hands>, Option<Hands>),
|
(Option<Hands>, Option<Hands>),
|
||||||
|
@ -9,7 +9,6 @@ use std::ops::Mul;
|
|||||||
pub struct IdleAnimation;
|
pub struct IdleAnimation;
|
||||||
|
|
||||||
impl Animation for IdleAnimation {
|
impl Animation for IdleAnimation {
|
||||||
#[allow(clippy::type_complexity)]
|
|
||||||
type Dependency<'a> = (
|
type Dependency<'a> = (
|
||||||
Option<ToolKind>,
|
Option<ToolKind>,
|
||||||
Option<ToolKind>,
|
Option<ToolKind>,
|
||||||
|
@ -7,7 +7,6 @@ use core::f32::consts::PI;
|
|||||||
|
|
||||||
pub struct JumpAnimation;
|
pub struct JumpAnimation;
|
||||||
impl Animation for JumpAnimation {
|
impl Animation for JumpAnimation {
|
||||||
#[allow(clippy::type_complexity)]
|
|
||||||
type Dependency<'a> = (
|
type Dependency<'a> = (
|
||||||
Option<ToolKind>,
|
Option<ToolKind>,
|
||||||
Option<ToolKind>,
|
Option<ToolKind>,
|
||||||
|
@ -8,7 +8,6 @@ use std::{f32::consts::PI, ops::Mul};
|
|||||||
pub struct MountAnimation;
|
pub struct MountAnimation;
|
||||||
|
|
||||||
impl Animation for MountAnimation {
|
impl Animation for MountAnimation {
|
||||||
#[allow(clippy::type_complexity)]
|
|
||||||
type Dependency<'a> = (
|
type Dependency<'a> = (
|
||||||
Option<ToolKind>,
|
Option<ToolKind>,
|
||||||
Option<ToolKind>,
|
Option<ToolKind>,
|
||||||
|
@ -12,7 +12,6 @@ use core::f32::consts::PI;
|
|||||||
pub struct RepeaterAnimation;
|
pub struct RepeaterAnimation;
|
||||||
|
|
||||||
impl Animation for RepeaterAnimation {
|
impl Animation for RepeaterAnimation {
|
||||||
#[allow(clippy::type_complexity)]
|
|
||||||
type Dependency<'a> = (
|
type Dependency<'a> = (
|
||||||
Option<AbilityInfo>,
|
Option<AbilityInfo>,
|
||||||
(Option<Hands>, Option<Hands>),
|
(Option<Hands>, Option<Hands>),
|
||||||
|
@ -13,7 +13,6 @@ pub struct Input {
|
|||||||
pub struct ShockwaveAnimation;
|
pub struct ShockwaveAnimation;
|
||||||
|
|
||||||
impl Animation for ShockwaveAnimation {
|
impl Animation for ShockwaveAnimation {
|
||||||
#[allow(clippy::type_complexity)]
|
|
||||||
type Dependency<'a> = (
|
type Dependency<'a> = (
|
||||||
Option<AbilityInfo>,
|
Option<AbilityInfo>,
|
||||||
(Option<Hands>, Option<Hands>),
|
(Option<Hands>, Option<Hands>),
|
||||||
|
@ -8,7 +8,6 @@ use core::{f32::consts::PI, ops::Mul};
|
|||||||
pub struct SneakWieldAnimation;
|
pub struct SneakWieldAnimation;
|
||||||
|
|
||||||
impl Animation for SneakWieldAnimation {
|
impl Animation for SneakWieldAnimation {
|
||||||
#[allow(clippy::type_complexity)]
|
|
||||||
type Dependency<'a> = (
|
type Dependency<'a> = (
|
||||||
Option<ToolKind>,
|
Option<ToolKind>,
|
||||||
Option<ToolKind>,
|
Option<ToolKind>,
|
||||||
|
@ -9,7 +9,6 @@ use std::ops::Mul;
|
|||||||
pub struct StandAnimation;
|
pub struct StandAnimation;
|
||||||
|
|
||||||
impl Animation for StandAnimation {
|
impl Animation for StandAnimation {
|
||||||
#[allow(clippy::type_complexity)]
|
|
||||||
type Dependency<'a> = (
|
type Dependency<'a> = (
|
||||||
Option<ToolKind>,
|
Option<ToolKind>,
|
||||||
Option<ToolKind>,
|
Option<ToolKind>,
|
||||||
|
@ -8,7 +8,6 @@ use core::{f32::consts::PI, ops::Mul};
|
|||||||
pub struct SwimWieldAnimation;
|
pub struct SwimWieldAnimation;
|
||||||
|
|
||||||
impl Animation for SwimWieldAnimation {
|
impl Animation for SwimWieldAnimation {
|
||||||
#[allow(clippy::type_complexity)]
|
|
||||||
type Dependency<'a> = (
|
type Dependency<'a> = (
|
||||||
Option<ToolKind>,
|
Option<ToolKind>,
|
||||||
Option<ToolKind>,
|
Option<ToolKind>,
|
||||||
|
@ -1,2 +0,0 @@
|
|||||||
# Because 7 is just very low, it corresponds to a 6-argument method.
|
|
||||||
too-many-arguments-threshold = 10
|
|
@ -14,7 +14,6 @@ pub(crate) struct LocalizationStats {
|
|||||||
pub(crate) errors: usize,
|
pub(crate) errors: usize,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(clippy::type_complexity)]
|
|
||||||
pub(crate) struct LocalizationAnalysis {
|
pub(crate) struct LocalizationAnalysis {
|
||||||
language_identifier: String,
|
language_identifier: String,
|
||||||
pub(crate) data: HashMap<Option<LocalizationState>, Vec<(PathBuf, String, Option<git2::Oid>)>>,
|
pub(crate) data: HashMap<Option<LocalizationState>, Vec<(PathBuf, String, Option<git2::Oid>)>>,
|
||||||
|
@ -15,7 +15,6 @@ pub const HP_ACCUMULATETIME: f32 = 1.0;
|
|||||||
#[derive(Default)]
|
#[derive(Default)]
|
||||||
pub struct Sys;
|
pub struct Sys;
|
||||||
impl<'a> System<'a> for Sys {
|
impl<'a> System<'a> for Sys {
|
||||||
#[allow(clippy::type_complexity)]
|
|
||||||
type SystemData = (
|
type SystemData = (
|
||||||
Entities<'a>,
|
Entities<'a>,
|
||||||
Read<'a, PlayerEntity>,
|
Read<'a, PlayerEntity>,
|
||||||
|
@ -12,7 +12,6 @@ use vek::*;
|
|||||||
#[derive(Default)]
|
#[derive(Default)]
|
||||||
pub struct Sys;
|
pub struct Sys;
|
||||||
impl<'a> System<'a> for Sys {
|
impl<'a> System<'a> for Sys {
|
||||||
#[allow(clippy::type_complexity)]
|
|
||||||
type SystemData = (
|
type SystemData = (
|
||||||
Entities<'a>,
|
Entities<'a>,
|
||||||
Read<'a, DeltaTime>,
|
Read<'a, DeltaTime>,
|
||||||
|
@ -583,7 +583,7 @@ pub struct Bag<'a> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Bag<'a> {
|
impl<'a> Bag<'a> {
|
||||||
#[allow(clippy::too_many_arguments)] // TODO: Pending review in #587
|
#[allow(clippy::too_many_arguments)]
|
||||||
pub fn new(
|
pub fn new(
|
||||||
client: &'a Client,
|
client: &'a Client,
|
||||||
global_state: &'a GlobalState,
|
global_state: &'a GlobalState,
|
||||||
|
@ -66,7 +66,6 @@ pub struct Buttons<'a> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Buttons<'a> {
|
impl<'a> Buttons<'a> {
|
||||||
#[allow(clippy::too_many_arguments)] // TODO: Pending review in #587
|
|
||||||
pub fn new(
|
pub fn new(
|
||||||
client: &'a Client,
|
client: &'a Client,
|
||||||
show_bag: bool,
|
show_bag: bool,
|
||||||
|
@ -105,7 +105,7 @@ pub struct Crafting<'a> {
|
|||||||
tooltip_manager: &'a mut TooltipManager,
|
tooltip_manager: &'a mut TooltipManager,
|
||||||
show: &'a mut Show,
|
show: &'a mut Show,
|
||||||
}
|
}
|
||||||
#[allow(clippy::too_many_arguments)]
|
|
||||||
impl<'a> Crafting<'a> {
|
impl<'a> Crafting<'a> {
|
||||||
pub fn new(
|
pub fn new(
|
||||||
client: &'a Client,
|
client: &'a Client,
|
||||||
|
@ -89,7 +89,6 @@ pub struct Group<'a> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Group<'a> {
|
impl<'a> Group<'a> {
|
||||||
#[allow(clippy::too_many_arguments)] // TODO: Pending review in #587
|
|
||||||
pub fn new(
|
pub fn new(
|
||||||
show: &'a mut Show,
|
show: &'a mut Show,
|
||||||
client: &'a Client,
|
client: &'a Client,
|
||||||
|
@ -65,7 +65,6 @@ pub struct LootScroller<'a> {
|
|||||||
common: widget::CommonBuilder,
|
common: widget::CommonBuilder,
|
||||||
}
|
}
|
||||||
impl<'a> LootScroller<'a> {
|
impl<'a> LootScroller<'a> {
|
||||||
#[allow(clippy::too_many_arguments)] // TODO: Pending review in #587
|
|
||||||
pub fn new(
|
pub fn new(
|
||||||
new_messages: &'a mut VecDeque<LootMessage>,
|
new_messages: &'a mut VecDeque<LootMessage>,
|
||||||
client: &'a Client,
|
client: &'a Client,
|
||||||
|
@ -114,7 +114,6 @@ pub struct Map<'a> {
|
|||||||
map_drag: Vec2<f64>,
|
map_drag: Vec2<f64>,
|
||||||
}
|
}
|
||||||
impl<'a> Map<'a> {
|
impl<'a> Map<'a> {
|
||||||
#[allow(clippy::too_many_arguments)] // TODO: Pending review in #587
|
|
||||||
pub fn new(
|
pub fn new(
|
||||||
show: &'a Show,
|
show: &'a Show,
|
||||||
client: &'a Client,
|
client: &'a Client,
|
||||||
|
@ -267,7 +267,7 @@ pub struct Skillbar<'a> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Skillbar<'a> {
|
impl<'a> Skillbar<'a> {
|
||||||
#[allow(clippy::too_many_arguments)] // TODO: Pending review in #587
|
#[allow(clippy::too_many_arguments)]
|
||||||
pub fn new(
|
pub fn new(
|
||||||
client: &'a Client,
|
client: &'a Client,
|
||||||
global_state: &'a GlobalState,
|
global_state: &'a GlobalState,
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#![deny(unsafe_code)]
|
#![deny(unsafe_code)]
|
||||||
#![allow(incomplete_features)]
|
#![allow(incomplete_features)]
|
||||||
#![allow(clippy::option_map_unit_fn)]
|
#![allow(clippy::identity_op, clippy::option_map_unit_fn)]
|
||||||
#![deny(clippy::clone_on_ref_ptr)]
|
#![deny(clippy::clone_on_ref_ptr)]
|
||||||
#![feature(
|
#![feature(
|
||||||
array_methods,
|
array_methods,
|
||||||
|
@ -51,7 +51,6 @@ impl Screen {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(clippy::too_many_arguments)]
|
|
||||||
pub(super) fn view(
|
pub(super) fn view(
|
||||||
&mut self,
|
&mut self,
|
||||||
fonts: &Fonts,
|
fonts: &Fonts,
|
||||||
|
@ -15,8 +15,8 @@ impl<V: Vertex> Clone for Mesh<V> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl<V: Vertex> Mesh<V> {
|
impl<V: Vertex> Mesh<V> {
|
||||||
|
#[allow(clippy::new_without_default)]
|
||||||
/// Create a new `Mesh`.
|
/// Create a new `Mesh`.
|
||||||
#[allow(clippy::new_without_default)] // TODO: Pending review in #587
|
|
||||||
pub fn new() -> Self { Self { verts: Vec::new() } }
|
pub fn new() -> Self { Self { verts: Vec::new() } }
|
||||||
|
|
||||||
/// Clear vertices, allows reusing allocated memory of the underlying Vec.
|
/// Clear vertices, allows reusing allocated memory of the underlying Vec.
|
||||||
|
@ -10,7 +10,6 @@ pub struct Vertex {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl Vertex {
|
impl Vertex {
|
||||||
#[allow(clippy::identity_op)] // TODO: Pending review in #587
|
|
||||||
pub fn new(pos: Vec3<f32>, norm: Vec3<f32>) -> Self {
|
pub fn new(pos: Vec3<f32>, norm: Vec3<f32>) -> Self {
|
||||||
let (norm_axis, norm_dir) = norm
|
let (norm_axis, norm_dir) = norm
|
||||||
.as_slice()
|
.as_slice()
|
||||||
|
@ -81,7 +81,7 @@ pub struct Shadow {
|
|||||||
|
|
||||||
impl Globals {
|
impl Globals {
|
||||||
/// Create global consts from the provided parameters.
|
/// Create global consts from the provided parameters.
|
||||||
#[allow(clippy::too_many_arguments)] // TODO: Pending review in #587
|
#[allow(clippy::too_many_arguments)]
|
||||||
pub fn new(
|
pub fn new(
|
||||||
view_mat: Mat4<f32>,
|
view_mat: Mat4<f32>,
|
||||||
proj_mat: Mat4<f32>,
|
proj_mat: Mat4<f32>,
|
||||||
|
@ -11,7 +11,6 @@ pub struct Vertex {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl Vertex {
|
impl Vertex {
|
||||||
#[allow(clippy::identity_op)] // TODO: Pending review in #587
|
|
||||||
/// NOTE: meta is true when the terrain vertex is touching water.
|
/// NOTE: meta is true when the terrain vertex is touching water.
|
||||||
pub fn new(atlas_pos: Vec2<u16>, pos: Vec3<f32>, norm: Vec3<f32>, meta: bool) -> Self {
|
pub fn new(atlas_pos: Vec2<u16>, pos: Vec3<f32>, norm: Vec3<f32>, meta: bool) -> Self {
|
||||||
const EXTRA_NEG_Z: f32 = 32768.0;
|
const EXTRA_NEG_Z: f32 = 32768.0;
|
||||||
@ -97,7 +96,6 @@ impl Vertex {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(clippy::identity_op)]
|
|
||||||
pub fn make_col_light_figure(
|
pub fn make_col_light_figure(
|
||||||
// 0 to 31
|
// 0 to 31
|
||||||
light: u8,
|
light: u8,
|
||||||
|
@ -98,7 +98,6 @@ struct Shadow {
|
|||||||
/// 1. Only interface pipelines created
|
/// 1. Only interface pipelines created
|
||||||
/// 2. All of the pipelines have been created
|
/// 2. All of the pipelines have been created
|
||||||
#[allow(clippy::large_enum_variant)] // They are both pretty large
|
#[allow(clippy::large_enum_variant)] // They are both pretty large
|
||||||
#[allow(clippy::type_complexity)]
|
|
||||||
enum State {
|
enum State {
|
||||||
// NOTE: this is used as a transient placeholder for moving things out of State temporarily
|
// NOTE: this is used as a transient placeholder for moving things out of State temporarily
|
||||||
Nothing,
|
Nothing,
|
||||||
|
@ -818,7 +818,6 @@ pub(super) fn initial_create_pipelines(
|
|||||||
/// Use this to recreate all the pipelines in the background.
|
/// Use this to recreate all the pipelines in the background.
|
||||||
/// TODO: report progress
|
/// TODO: report progress
|
||||||
/// NOTE: this tries to use all the CPU cores to complete as soon as possible
|
/// NOTE: this tries to use all the CPU cores to complete as soon as possible
|
||||||
#[allow(clippy::type_complexity)]
|
|
||||||
pub(super) fn recreate_pipelines(
|
pub(super) fn recreate_pipelines(
|
||||||
device: Arc<wgpu::Device>,
|
device: Arc<wgpu::Device>,
|
||||||
immutable_layouts: Arc<ImmutableLayouts>,
|
immutable_layouts: Arc<ImmutableLayouts>,
|
||||||
|
@ -151,7 +151,6 @@ pub struct DebugShapeId(pub u64);
|
|||||||
pub struct Debug {
|
pub struct Debug {
|
||||||
next_shape_id: DebugShapeId,
|
next_shape_id: DebugShapeId,
|
||||||
pending_shapes: HashMap<DebugShapeId, DebugShape>,
|
pending_shapes: HashMap<DebugShapeId, DebugShape>,
|
||||||
#[allow(clippy::type_complexity)]
|
|
||||||
pending_locals: HashMap<DebugShapeId, ([f32; 4], [f32; 4], [f32; 4])>,
|
pending_locals: HashMap<DebugShapeId, ([f32; 4], [f32; 4], [f32; 4])>,
|
||||||
pending_deletes: HashSet<DebugShapeId>,
|
pending_deletes: HashSet<DebugShapeId>,
|
||||||
models: HashMap<DebugShapeId, (Model<DebugVertex>, Bound<Consts<DebugLocals>>)>,
|
models: HashMap<DebugShapeId, (Model<DebugVertex>, Bound<Consts<DebugLocals>>)>,
|
||||||
|
@ -280,7 +280,6 @@ impl CharacterCacheKey {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(clippy::type_complexity)] // TODO: Pending review in #587
|
|
||||||
pub struct FigureModelCache<Skel = anim::character::CharacterSkeleton>
|
pub struct FigureModelCache<Skel = anim::character::CharacterSkeleton>
|
||||||
where
|
where
|
||||||
Skel: Skeleton,
|
Skel: Skeleton,
|
||||||
@ -295,7 +294,7 @@ impl<Skel: Skeleton> FigureModelCache<Skel>
|
|||||||
where
|
where
|
||||||
Skel::Body: BodySpec + Eq + Hash,
|
Skel::Body: BodySpec + Eq + Hash,
|
||||||
{
|
{
|
||||||
#[allow(clippy::new_without_default)] // TODO: Pending review in #587
|
#[allow(clippy::new_without_default)]
|
||||||
pub fn new() -> Self {
|
pub fn new() -> Self {
|
||||||
// NOTE: It might be better to bubble this error up rather than panicking.
|
// NOTE: It might be better to bubble this error up rather than panicking.
|
||||||
let manifests = <Skel::Body as BodySpec>::load_spec().unwrap();
|
let manifests = <Skel::Body as BodySpec>::load_spec().unwrap();
|
||||||
|
@ -5407,7 +5407,6 @@ impl FigureMgr {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(clippy::too_many_arguments)] // TODO: Pending review in #587
|
|
||||||
fn get_model_for_render(
|
fn get_model_for_render(
|
||||||
&self,
|
&self,
|
||||||
tick: u64,
|
tick: u64,
|
||||||
|
@ -44,7 +44,6 @@ impl<T> Target<T> {
|
|||||||
pub const MAX_TARGET_RANGE: f32 = 300.0;
|
pub const MAX_TARGET_RANGE: f32 = 300.0;
|
||||||
|
|
||||||
/// Calculate what the cursor is pointing at within the 3d scene
|
/// Calculate what the cursor is pointing at within the 3d scene
|
||||||
#[allow(clippy::type_complexity)]
|
|
||||||
pub(super) fn targets_under_cursor(
|
pub(super) fn targets_under_cursor(
|
||||||
client: &Client,
|
client: &Client,
|
||||||
cam_pos: Vec3<f32>,
|
cam_pos: Vec3<f32>,
|
||||||
|
@ -149,7 +149,6 @@ pub struct GraphicCache {
|
|||||||
// Stores the location of graphics rendered at a particular resolution and cached on the cpu
|
// Stores the location of graphics rendered at a particular resolution and cached on the cpu
|
||||||
cache_map: HashMap<Parameters, CachedDetails>,
|
cache_map: HashMap<Parameters, CachedDetails>,
|
||||||
|
|
||||||
#[allow(clippy::type_complexity)]
|
|
||||||
keyed_jobs: KeyedJobs<(Id, Vec2<u16>), Option<(RgbaImage, Option<Rgba<f32>>)>>,
|
keyed_jobs: KeyedJobs<(Id, Vec2<u16>), Option<(RgbaImage, Option<Rgba<f32>>)>>,
|
||||||
}
|
}
|
||||||
impl GraphicCache {
|
impl GraphicCache {
|
||||||
@ -405,7 +404,6 @@ impl GraphicCache {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Draw a graphic at the specified dimensions
|
// Draw a graphic at the specified dimensions
|
||||||
#[allow(clippy::type_complexity)]
|
|
||||||
fn draw_graphic(
|
fn draw_graphic(
|
||||||
graphic_map: &GraphicMap,
|
graphic_map: &GraphicMap,
|
||||||
graphic_id: Id,
|
graphic_id: Id,
|
||||||
|
@ -524,7 +524,6 @@ where
|
|||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(clippy::too_many_arguments)] // TODO: Pending review in #587
|
|
||||||
fn new(
|
fn new(
|
||||||
slot_key: K,
|
slot_key: K,
|
||||||
empty_slot: image::Id,
|
empty_slot: image::Id,
|
||||||
|
@ -747,8 +747,7 @@ fn main() {
|
|||||||
let mut total_timings: BTreeMap<&str, f32> = BTreeMap::new();
|
let mut total_timings: BTreeMap<&str, f32> = BTreeMap::new();
|
||||||
let mut count = 0;
|
let mut count = 0;
|
||||||
let mut volgrid = VolGrid2d::new().unwrap();
|
let mut volgrid = VolGrid2d::new().unwrap();
|
||||||
for (i, spiralpos) in Spiral2d::new()
|
for (i, spiralpos) in Spiral2d::with_radius(RADIUS)
|
||||||
.radius(RADIUS)
|
|
||||||
.map(|v| v + sitepos.as_())
|
.map(|v| v + sitepos.as_())
|
||||||
.enumerate()
|
.enumerate()
|
||||||
{
|
{
|
||||||
|
@ -186,7 +186,6 @@ impl<'a> BlockGen<'a> {
|
|||||||
.or_else(|| {
|
.or_else(|| {
|
||||||
// Rocks
|
// Rocks
|
||||||
if (height + 2.5 - wposf.z as f32).div(7.5).abs().powi(2) < rock {
|
if (height + 2.5 - wposf.z as f32).div(7.5).abs().powi(2) < rock {
|
||||||
#[allow(clippy::identity_op)]
|
|
||||||
let field0 = RandomField::new(world.seed + 0);
|
let field0 = RandomField::new(world.seed + 0);
|
||||||
let field1 = RandomField::new(world.seed + 1);
|
let field1 = RandomField::new(world.seed + 1);
|
||||||
let field2 = RandomField::new(world.seed + 2);
|
let field2 = RandomField::new(world.seed + 2);
|
||||||
|
@ -39,7 +39,6 @@ pub struct CaveInfo {
|
|||||||
pub name: String,
|
pub name: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(clippy::type_complexity)] // TODO: Pending review in #587
|
|
||||||
#[derive(Default)]
|
#[derive(Default)]
|
||||||
pub struct Civs {
|
pub struct Civs {
|
||||||
pub civs: Store<Civ>,
|
pub civs: Store<Civ>,
|
||||||
|
@ -139,7 +139,6 @@ pub struct Noise {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl Noise {
|
impl Noise {
|
||||||
#[allow(clippy::identity_op)]
|
|
||||||
fn new(seed: u32) -> Self {
|
fn new(seed: u32) -> Self {
|
||||||
Self {
|
Self {
|
||||||
cave_nz: SuperSimplex::new().set_seed(seed + 0),
|
cave_nz: SuperSimplex::new().set_seed(seed + 0),
|
||||||
|
@ -21,7 +21,6 @@ pub fn apply_scatter_to(canvas: &mut Canvas, rng: &mut impl Rng) {
|
|||||||
use WaterMode::*;
|
use WaterMode::*;
|
||||||
|
|
||||||
use SpriteKind::*;
|
use SpriteKind::*;
|
||||||
#[allow(clippy::type_complexity)]
|
|
||||||
// TODO: Add back all sprites we had before
|
// TODO: Add back all sprites we had before
|
||||||
let scatter: &[(
|
let scatter: &[(
|
||||||
_,
|
_,
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#![allow(
|
#![allow(
|
||||||
clippy::option_map_unit_fn,
|
clippy::option_map_unit_fn,
|
||||||
clippy::blocks_in_if_conditions,
|
clippy::blocks_in_if_conditions,
|
||||||
clippy::too_many_arguments
|
clippy::identity_op
|
||||||
)]
|
)]
|
||||||
#![allow(clippy::branches_sharing_code)] // TODO: evaluate
|
#![allow(clippy::branches_sharing_code)] // TODO: evaluate
|
||||||
#![deny(clippy::clone_on_ref_ptr)]
|
#![deny(clippy::clone_on_ref_ptr)]
|
||||||
|
@ -697,6 +697,7 @@ impl m32 {
|
|||||||
/// Prediction in Geomorphology, Geophysical Monograph 135.
|
/// Prediction in Geomorphology, Geophysical Monograph 135.
|
||||||
/// Copyright 2003 by the American Geophysical Union
|
/// Copyright 2003 by the American Geophysical Union
|
||||||
/// 10.1029/135GM09
|
/// 10.1029/135GM09
|
||||||
|
#[allow(clippy::too_many_arguments)]
|
||||||
fn erode(
|
fn erode(
|
||||||
// Underlying map dimensions.
|
// Underlying map dimensions.
|
||||||
map_size_lg: MapSizeLg,
|
map_size_lg: MapSizeLg,
|
||||||
@ -2339,7 +2340,6 @@ pub fn mrec_downhill(
|
|||||||
/// * A bitmask representing which neighbors are downhill.
|
/// * A bitmask representing which neighbors are downhill.
|
||||||
/// * Stack order for multiple receivers (from top to bottom).
|
/// * Stack order for multiple receivers (from top to bottom).
|
||||||
/// * The weight for each receiver, for each node.
|
/// * The weight for each receiver, for each node.
|
||||||
#[allow(clippy::type_complexity)] // TODO: Pending review in #587
|
|
||||||
pub fn get_multi_rec<F: fmt::Debug + Float + Sync + Into<Compute>>(
|
pub fn get_multi_rec<F: fmt::Debug + Float + Sync + Into<Compute>>(
|
||||||
map_size_lg: MapSizeLg,
|
map_size_lg: MapSizeLg,
|
||||||
h: impl Fn(usize) -> F + Sync,
|
h: impl Fn(usize) -> F + Sync,
|
||||||
@ -2531,6 +2531,7 @@ pub fn get_multi_rec<F: fmt::Debug + Float + Sync + Into<Compute>>(
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Perform erosion n times.
|
/// Perform erosion n times.
|
||||||
|
#[allow(clippy::too_many_arguments)]
|
||||||
pub fn do_erosion(
|
pub fn do_erosion(
|
||||||
map_size_lg: MapSizeLg,
|
map_size_lg: MapSizeLg,
|
||||||
_max_uplift: f32,
|
_max_uplift: f32,
|
||||||
|
@ -558,7 +558,6 @@ impl Settlement {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(clippy::identity_op)] // TODO: Pending review in #587
|
|
||||||
pub fn apply_to<'a>(
|
pub fn apply_to<'a>(
|
||||||
&'a self,
|
&'a self,
|
||||||
index: IndexRef,
|
index: IndexRef,
|
||||||
|
@ -42,7 +42,6 @@ impl Castle {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl Structure for Castle {
|
impl Structure for Castle {
|
||||||
#[allow(clippy::identity_op)]
|
|
||||||
fn render(&self, site: &Site, _land: &Land, painter: &Painter) {
|
fn render(&self, site: &Site, _land: &Land, painter: &Painter) {
|
||||||
let wall_height = 24;
|
let wall_height = 24;
|
||||||
let parapet_height = 2;
|
let parapet_height = 2;
|
||||||
|
@ -13,7 +13,6 @@ pub struct StructureGen2d {
|
|||||||
pub type StructureField = (Vec2<i32>, u32);
|
pub type StructureField = (Vec2<i32>, u32);
|
||||||
|
|
||||||
impl StructureGen2d {
|
impl StructureGen2d {
|
||||||
#[allow(clippy::identity_op)] // TODO: Pending review in #587
|
|
||||||
pub fn new(seed: u32, freq: u32, spread: u32) -> Self {
|
pub fn new(seed: u32, freq: u32, spread: u32) -> Self {
|
||||||
Self {
|
Self {
|
||||||
freq,
|
freq,
|
||||||
|
Loading…
Reference in New Issue
Block a user