Suppressed all existing clippy warnings in preparation for fixes as part of #587

This commit is contained in:
Ben Wallis 2020-06-10 20:47:36 +01:00
parent de849adf84
commit 950c62efc6
161 changed files with 375 additions and 7 deletions

View File

@ -14,7 +14,7 @@ code-quality:
- veloren-docker - veloren-docker
script: script:
- ln -s /dockercache/cache-all target - ln -s /dockercache/cache-all target
- cargo clippy -- --warn clippy::all - cargo clippy -- -D warnings
- cargo fmt --all -- --check - cargo fmt --all -- --check
security: security:

View File

@ -78,6 +78,8 @@ fn nth_word(line: &str, n: usize) -> Option<usize> {
None None
} }
#[allow(clippy::chars_next_cmp)] // TODO: Pending review in #587
#[allow(clippy::collapsible_if)] // TODO: Pending review in #587
pub fn complete(line: &str, client: &Client) -> Vec<String> { pub fn complete(line: &str, client: &Client) -> Vec<String> {
let word = if line.chars().last().map_or(true, char::is_whitespace) { let word = if line.chars().last().map_or(true, char::is_whitespace) {
"" ""

View File

@ -99,6 +99,8 @@ pub struct CharacterList {
impl Client { impl Client {
/// Create a new `Client`. /// Create a new `Client`.
#[allow(clippy::cmp_owned)] // TODO: Pending review in #587
#[allow(clippy::or_fun_call)] // TODO: Pending review in #587
pub fn new<A: Into<SocketAddr>>(addr: A, view_distance: Option<u32>) -> Result<Self, Error> { pub fn new<A: Into<SocketAddr>>(addr: A, view_distance: Option<u32>) -> Result<Self, Error> {
let client_state = ClientState::Connected; let client_state = ClientState::Connected;
let mut postbox = PostBox::to(addr)?; let mut postbox = PostBox::to(addr)?;
@ -480,6 +482,7 @@ impl Client {
/// Execute a single client tick, handle input and update the game state by /// Execute a single client tick, handle input and update the game state by
/// the given duration. /// the given duration.
#[allow(clippy::manual_saturating_arithmetic)] // TODO: Pending review in #587
pub fn tick( pub fn tick(
&mut self, &mut self,
inputs: ControllerInputs, inputs: ControllerInputs,
@ -699,6 +702,7 @@ impl Client {
} }
/// Handle new server messages. /// Handle new server messages.
#[allow(clippy::collapsible_if)] // TODO: Pending review in #587
fn handle_new_messages(&mut self) -> Result<Vec<Event>, Error> { fn handle_new_messages(&mut self) -> Result<Vec<Event>, Error> {
let mut frontend_events = Vec::new(); let mut frontend_events = Vec::new();

View File

@ -305,7 +305,7 @@ lazy_static! {
} }
if let Ok(result) = std::env::var("XDG_DATA_DIRS") { if let Ok(result) = std::env::var("XDG_DATA_DIRS") {
result.split(":").for_each(|x| paths.push(format!("{}/veloren/assets", x).into())); result.split(':').for_each(|x| paths.push(format!("{}/veloren/assets", x).into()));
} else { } else {
// Fallback // Fallback
let fallback_paths = vec!["/usr/local/share", "/usr/share"]; let fallback_paths = vec!["/usr/local/share", "/usr/share"];

View File

@ -104,6 +104,9 @@ impl Watcher {
} }
} }
#[allow(clippy::drop_copy)] // TODO: Pending review in #587
#[allow(clippy::single_match)] // TODO: Pending review in #587
#[allow(clippy::zero_ptr)] // TODO: Pending review in #587
fn run(mut self) -> Sender<(PathBuf, Handler, Weak<AtomicBool>)> { fn run(mut self) -> Sender<(PathBuf, Handler, Weak<AtomicBool>)> {
let (watch_tx, watch_rx) = unbounded(); let (watch_tx, watch_rx) = unbounded();
@ -136,6 +139,7 @@ pub struct ReloadIndicator {
paths: Vec<PathBuf>, paths: Vec<PathBuf>,
} }
impl ReloadIndicator { impl ReloadIndicator {
#[allow(clippy::new_without_default)] // TODO: Pending review in #587
pub fn new() -> Self { pub fn new() -> Self {
Self { Self {
reloaded: Arc::new(AtomicBool::new(false)), reloaded: Arc::new(AtomicBool::new(false)),

View File

@ -24,6 +24,7 @@ pub enum Error {
Full(Vec<Item>), Full(Vec<Item>),
} }
#[allow(clippy::len_without_is_empty)] // TODO: Pending review in #587
impl Inventory { impl Inventory {
pub fn slots(&self) -> &[Option<Item>] { &self.slots } pub fn slots(&self) -> &[Option<Item>] { &self.slots }
@ -180,6 +181,7 @@ impl Inventory {
/// the proper structure wouldn't need to iterate at all, but because /// the proper structure wouldn't need to iterate at all, but because
/// this should be fairly cold code, clarity has been favored over /// this should be fairly cold code, clarity has been favored over
/// efficiency. /// efficiency.
#[allow(clippy::option_map_unit_fn)] // TODO: Pending review in #587
pub fn push_all_unique<I: Iterator<Item = Item>>(&mut self, mut items: I) -> Result<(), Error> { pub fn push_all_unique<I: Iterator<Item = Item>>(&mut self, mut items: I) -> Result<(), Error> {
let mut leftovers = Vec::new(); let mut leftovers = Vec::new();
for item in &mut items { for item in &mut items {

View File

@ -139,6 +139,7 @@ pub fn loadout_remove(equip_slot: EquipSlot, loadout: &mut Loadout) -> Option<it
loadout_replace(equip_slot, None, loadout) loadout_replace(equip_slot, None, loadout)
} }
#[allow(clippy::redundant_closure)] // TODO: Pending review in #587
fn swap_inventory_loadout( fn swap_inventory_loadout(
inventory_slot: usize, inventory_slot: usize,
equip_slot: EquipSlot, equip_slot: EquipSlot,
@ -195,6 +196,7 @@ fn swap_loadout(slot_a: EquipSlot, slot_b: EquipSlot, loadout: &mut Loadout) {
// Should this report if a change actually occurred? (might be useful when // Should this report if a change actually occurred? (might be useful when
// minimizing network use) // minimizing network use)
#[allow(clippy::option_map_unit_fn)] // TODO: Pending review in #587
pub fn swap( pub fn swap(
slot_a: Slot, slot_a: Slot,
slot_b: Slot, slot_b: Slot,

View File

@ -59,6 +59,7 @@ pub enum LocalEvent {
Boost { entity: EcsEntity, vel: Vec3<f32> }, Boost { entity: EcsEntity, vel: Vec3<f32> },
} }
#[allow(clippy::large_enum_variant)] // TODO: Pending review in #587
pub enum ServerEvent { pub enum ServerEvent {
Explosion { Explosion {
pos: Vec3<f32>, pos: Vec3<f32>,

View File

@ -73,6 +73,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
pub fn new() -> Self { DynaUnionizer(Vec::new()) } pub fn new() -> Self { DynaUnionizer(Vec::new()) }
pub fn add(mut self, dyna: Dyna<V, ()>, offset: Vec3<i32>) -> Self { pub fn add(mut self, dyna: Dyna<V, ()>, offset: Vec3<i32>) -> Self {
@ -87,6 +88,7 @@ impl<V: Vox + Copy> DynaUnionizer<V> {
} }
} }
#[allow(clippy::neg_multiply)] // TODO: Pending review in #587
pub fn unify(self) -> (Dyna<V, ()>, Vec3<i32>) { pub fn unify(self) -> (Dyna<V, ()>, Vec3<i32>) {
if self.0.is_empty() { if self.0.is_empty() {
return (Dyna::filled(Vec3::zero(), V::empty(), ()), Vec3::zero()); return (Dyna::filled(Vec3::zero(), V::empty(), ()), Vec3::zero());

View File

@ -24,6 +24,7 @@ use crate::{
pub struct LoadoutBuilder(Loadout); pub struct LoadoutBuilder(Loadout);
impl LoadoutBuilder { impl LoadoutBuilder {
#[allow(clippy::new_without_default)] // TODO: Pending review in #587
pub fn new() -> Self { pub fn new() -> Self {
Self(Loadout { Self(Loadout {
active_item: None, active_item: None,

View File

@ -6,6 +6,7 @@ use sum_type::sum_type;
// Automatically derive From<T> for EcsCompPacket // Automatically derive From<T> for EcsCompPacket
// for each variant EcsCompPacket::T(T.) // for each variant EcsCompPacket::T(T.)
sum_type! { sum_type! {
#[allow(clippy::large_enum_variant)] // TODO: Pending review in #587
#[derive(Clone, Debug, Serialize, Deserialize)] #[derive(Clone, Debug, Serialize, Deserialize)]
pub enum EcsCompPacket { pub enum EcsCompPacket {
Body(comp::Body), Body(comp::Body),

View File

@ -31,6 +31,7 @@ impl<T> FromIterator<T> for Path<T> {
} }
} }
#[allow(clippy::len_without_is_empty)] // TODO: Pending review in #587
impl<T> Path<T> { impl<T> Path<T> {
pub fn len(&self) -> usize { self.nodes.len() } pub fn len(&self) -> usize { self.nodes.len() }
@ -151,6 +152,7 @@ impl Chaser {
} }
} }
#[allow(clippy::float_cmp)] // TODO: Pending review in #587
fn find_path<V>( fn find_path<V>(
astar: &mut Option<Astar<Vec3<i32>, DefaultHashBuilder>>, astar: &mut Option<Astar<Vec3<i32>, DefaultHashBuilder>>,
vol: &V, vol: &V,

View File

@ -89,6 +89,7 @@ pub struct RegionMap {
tick: u64, tick: u64,
} }
impl RegionMap { impl RegionMap {
#[allow(clippy::new_without_default)] // TODO: Pending review in #587
pub fn new() -> Self { pub fn new() -> Self {
Self { Self {
regions: IndexMap::default(), regions: IndexMap::default(),
@ -222,6 +223,7 @@ impl RegionMap {
/// Finds the region where a given entity is located using a given position /// Finds the region where a given entity is located using a given position
/// to speed up the search /// to speed up the search
#[allow(clippy::needless_range_loop)] // TODO: Pending review in #587
pub fn find_region(&self, entity: specs::Entity, pos: Vec3<f32>) -> Option<Vec2<i32>> { pub fn find_region(&self, entity: specs::Entity, pos: Vec3<f32>) -> Option<Vec2<i32>> {
let id = entity.id(); let id = entity.id();
// Compute key for most likely region // Compute key for most likely region
@ -306,6 +308,7 @@ impl RegionMap {
} }
/// Add a region using its key /// Add a region using its key
#[allow(clippy::needless_range_loop)] // TODO: Pending review in #587
fn remove_index(&mut self, index: usize) { fn remove_index(&mut self, index: usize) {
// Remap neighbor indices for neighbors of the region that will be moved from // Remap neighbor indices for neighbors of the region that will be moved from
// the end of the index map // the end of the index map

View File

@ -9,12 +9,15 @@ pub struct Spiral2d {
} }
impl Spiral2d { impl Spiral2d {
#[allow(clippy::new_without_default)] // TODO: Pending review in #587
pub fn new() -> Self { Self { layer: 0, i: 0 } } pub fn new() -> Self { Self { layer: 0, i: 0 } }
} }
impl Iterator for Spiral2d { impl Iterator for Spiral2d {
type Item = Vec2<i32>; type Item = Vec2<i32>;
#[allow(clippy::erasing_op)] // TODO: Pending review in #587
#[allow(clippy::identity_op)] // TODO: Pending review in #587
fn next(&mut self) -> Option<Self::Item> { fn next(&mut self) -> Option<Self::Item> {
let layer_size = (self.layer * 8 + 4 * self.layer.min(1) - 4).max(1); let layer_size = (self.layer * 8 + 4 * self.layer.min(1) - 4).max(1);
if self.i >= layer_size { if self.i >= layer_size {

View File

@ -69,6 +69,7 @@ impl CharacterBehavior for Data {
fn behavior(&self, data: &JoinData) -> StateUpdate { fn behavior(&self, data: &JoinData) -> StateUpdate {
let mut update = StateUpdate::from(data); let mut update = StateUpdate::from(data);
#[allow(clippy::or_fun_call)] // TODO: Pending review in #587
let stage_time_active = self let stage_time_active = self
.stage_time_active .stage_time_active
.checked_add(Duration::from_secs_f32(data.dt.0)) .checked_add(Duration::from_secs_f32(data.dt.0))

View File

@ -40,6 +40,7 @@ pub fn handle_move(data: &JoinData, update: &mut StateUpdate, efficiency: f32) {
} }
/// Updates components to move player as if theyre on ground or in air /// Updates components to move player as if theyre on ground or in air
#[allow(clippy::assign_op_pattern)] // TODO: Pending review in #587
fn basic_move(data: &JoinData, update: &mut StateUpdate, efficiency: f32) { fn basic_move(data: &JoinData, update: &mut StateUpdate, efficiency: f32) {
let (accel, speed): (f32, f32) = if data.physics.on_ground { let (accel, speed): (f32, f32) = if data.physics.on_ground {
(BASE_HUMANOID_ACCEL, BASE_HUMANOID_SPEED) (BASE_HUMANOID_ACCEL, BASE_HUMANOID_SPEED)

View File

@ -116,6 +116,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
pub fn new() -> Self { pub fn new() -> Self {
Self { Self {
comp_updates: Vec::new(), comp_updates: Vec::new(),

View File

@ -23,6 +23,7 @@ use vek::*;
/// This system will allow NPCs to modify their controller /// This system will allow NPCs to modify their controller
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>,
Read<'a, Time>, Read<'a, Time>,
@ -42,6 +43,7 @@ impl<'a> System<'a> for Sys {
ReadStorage<'a, MountState>, ReadStorage<'a, MountState>,
); );
#[allow(clippy::or_fun_call)] // TODO: Pending review in #587
fn run( fn run(
&mut self, &mut self,
( (

View File

@ -109,6 +109,7 @@ impl<'a> JoinData<'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 = (
Entities<'a>, Entities<'a>,
Read<'a, UidAllocator>, Read<'a, UidAllocator>,
@ -131,6 +132,7 @@ impl<'a> System<'a> for Sys {
ReadStorage<'a, Mounting>, ReadStorage<'a, Mounting>,
); );
#[allow(clippy::while_let_on_iterator)] // TODO: Pending review in #587
fn run( fn run(
&mut self, &mut self,
( (

View File

@ -16,6 +16,7 @@ pub const BLOCK_ANGLE: f32 = 180.0;
/// attacking /// attacking
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>>,

View File

@ -15,6 +15,7 @@ use specs::{
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, UidAllocator>, Read<'a, UidAllocator>,

View File

@ -11,6 +11,7 @@ use vek::*;
/// This system is responsible for controlling mounts /// This system is responsible for controlling mounts
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>,
@ -22,6 +23,7 @@ impl<'a> System<'a> for Sys {
WriteStorage<'a, Ori>, WriteStorage<'a, Ori>,
); );
#[allow(clippy::option_map_unit_fn)] // TODO: Pending review in #587
fn run( fn run(
&mut self, &mut self,
( (

View File

@ -38,6 +38,7 @@ fn integrate_forces(dt: f32, mut lv: Vec3<f32>, grav: f32, damp: f32) -> Vec3<f3
/// This system applies forces and calculates new positions and velocities. /// This system applies forces and calculates new positions and velocities.
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, Uid>, ReadStorage<'a, Uid>,
@ -56,6 +57,8 @@ impl<'a> System<'a> for Sys {
ReadStorage<'a, Mounting>, ReadStorage<'a, Mounting>,
); );
#[allow(clippy::or_fun_call)] // TODO: Pending review in #587
#[allow(clippy::block_in_if_condition_stmt)] // TODO: Pending review in #587
fn run( fn run(
&mut self, &mut self,
( (

View File

@ -14,6 +14,7 @@ use vek::*;
/// This system is responsible for handling projectile effect triggers /// This system is responsible for handling projectile effect triggers
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>,

View File

@ -10,6 +10,7 @@ const ENERGY_REGEN_ACCEL: f32 = 10.0;
/// This system kills players, levels them up, and regenerates energy. /// This system kills players, levels them up, and regenerates energy.
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>,

View File

@ -167,6 +167,7 @@ impl<V: Vox, S: RectVolSize, M: Clone> Iterator for ChonkIterHelper<V, S, M> {
} }
} }
#[allow(clippy::type_complexity)] // TODO: Pending review in #587
pub struct ChonkPosIter<V: Vox, S: RectVolSize, M: Clone> { pub struct ChonkPosIter<V: Vox, 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>)>,

View File

@ -40,6 +40,7 @@ pub fn linear_to_srgba(col: Rgba<f32>) -> Rgba<f32> {
/// Convert rgb to hsv. Expects rgb to be [0, 1]. /// Convert rgb to hsv. Expects rgb to be [0, 1].
#[inline(always)] #[inline(always)]
#[allow(clippy::many_single_char_names)] #[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> { pub fn rgb_to_hsv(rgb: Rgb<f32>) -> Vec3<f32> {
let (r, g, b) = rgb.into_tuple(); let (r, g, b) = rgb.into_tuple();
let (max, min, diff, add) = { let (max, min, diff, add) = {

View File

@ -4,7 +4,7 @@ mod dir;
pub const GIT_VERSION: &str = include_str!(concat!(env!("OUT_DIR"), "/githash")); pub const GIT_VERSION: &str = include_str!(concat!(env!("OUT_DIR"), "/githash"));
lazy_static::lazy_static! { lazy_static::lazy_static! {
pub static ref GIT_HASH: &'static str = GIT_VERSION.split('/').nth(0).expect("failed to retrieve git_hash!"); pub static ref GIT_HASH: &'static str = GIT_VERSION.split('/').next().expect("failed to retrieve git_hash!");
pub static ref GIT_DATE: &'static str = GIT_VERSION.split('/').nth(1).expect("failed to retrieve git_date!"); pub static ref GIT_DATE: &'static str = GIT_VERSION.split('/').nth(1).expect("failed to retrieve git_date!");
} }

View File

@ -97,6 +97,7 @@ 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<'a>(&'a self, pos: Vec3<i32>) -> Result<&'a Self::Vox, Self::Error>; fn get<'a>(&'a self, pos: Vec3<i32>) -> Result<&'a Self::Vox, Self::Error>;
#[allow(clippy::type_complexity)] // TODO: Pending review in #587
fn ray<'a>( fn ray<'a>(
&'a self, &'a self,
from: Vec3<f32>, from: Vec3<f32>,

View File

@ -208,6 +208,7 @@ impl<V: Vox, S: VolSize, M> ReadVol for Chunk<V, S, M> {
impl<V: Vox, S: VolSize, M> WriteVol for Chunk<V, S, M> { impl<V: Vox, S: VolSize, M> WriteVol for Chunk<V, S, M> {
#[inline(always)] #[inline(always)]
#[allow(clippy::unit_arg)] // TODO: Pending review in #587
fn set(&mut self, pos: Vec3<i32>, vox: Self::Vox) -> Result<(), Self::Error> { fn set(&mut self, pos: Vec3<i32>, vox: Self::Vox) -> Result<(), Self::Error> {
if !pos if !pos
.map2(S::SIZE, |e, s| 0 <= e && e < s as i32) .map2(S::SIZE, |e, s| 0 <= e && e < s as i32)

View File

@ -148,6 +148,7 @@ impl<V: RectRasterableVol> VolGrid2d<V> {
} }
} }
#[allow(clippy::needless_lifetimes)] // TODO: Pending review in #587
pub fn cached<'a>(&'a self) -> CachedVolGrid2d<'a, V> { CachedVolGrid2d::new(self) } pub fn cached<'a>(&'a self) -> CachedVolGrid2d<'a, V> { CachedVolGrid2d::new(self) }
} }

View File

@ -7,6 +7,7 @@ use std::time::Duration;
const TPS: u64 = 30; const TPS: u64 = 30;
#[allow(clippy::redundant_pattern_matching)] // TODO: Pending review in #587
fn main() { fn main() {
// Init logging // Init logging
if let Err(_) = std::env::var("RUST_LOG") { if let Err(_) = std::env::var("RUST_LOG") {

View File

@ -22,6 +22,7 @@ pub struct ChunkGenerator {
pending_chunks: HashMap<Vec2<i32>, Arc<AtomicBool>>, pending_chunks: HashMap<Vec2<i32>, Arc<AtomicBool>>,
} }
impl ChunkGenerator { impl ChunkGenerator {
#[allow(clippy::new_without_default)] // TODO: Pending review in #587
pub fn new() -> Self { pub fn new() -> Self {
let (chunk_tx, chunk_rx) = channel::unbounded(); let (chunk_tx, chunk_rx) = channel::unbounded();
Self { Self {

View File

@ -29,6 +29,7 @@ pub trait ChatCommandExt {
fn execute(&self, server: &mut Server, entity: EcsEntity, args: String); fn execute(&self, server: &mut Server, entity: EcsEntity, args: String);
} }
impl ChatCommandExt for ChatCommand { impl ChatCommandExt for ChatCommand {
#[allow(clippy::needless_return)] // TODO: Pending review in #587
fn execute(&self, server: &mut Server, entity: EcsEntity, args: String) { fn execute(&self, server: &mut Server, entity: EcsEntity, args: String) {
let cmd_data = self.data(); let cmd_data = self.data();
if cmd_data.needs_admin && !server.entity_is_admin(entity) { if cmd_data.needs_admin && !server.entity_is_admin(entity) {
@ -91,6 +92,8 @@ fn get_handler(cmd: &ChatCommand) -> CommandHandler {
} }
} }
#[allow(clippy::identity_conversion)] // TODO: Pending review in #587
#[allow(clippy::option_map_unit_fn)] // TODO: Pending review in #587
fn handle_give_item( fn handle_give_item(
server: &mut Server, server: &mut Server,
client: EcsEntity, client: EcsEntity,
@ -189,6 +192,7 @@ fn handle_jump(
} }
} }
#[allow(clippy::identity_conversion)] // TODO: Pending review in #587
fn handle_goto( fn handle_goto(
server: &mut Server, server: &mut Server,
client: EcsEntity, client: EcsEntity,
@ -220,6 +224,8 @@ fn handle_goto(
} }
} }
#[allow(clippy::collapsible_if)] // TODO: Pending review in #587
#[allow(clippy::option_map_unit_fn)] // TODO: Pending review in #587
fn handle_kill( fn handle_kill(
server: &mut Server, server: &mut Server,
client: EcsEntity, client: EcsEntity,
@ -244,6 +250,7 @@ fn handle_kill(
.map(|s| s.health.set_to(0, reason)); .map(|s| s.health.set_to(0, reason));
} }
#[allow(clippy::option_as_ref_deref)] // TODO: Pending review in #587
fn handle_time( fn handle_time(
server: &mut Server, server: &mut Server,
client: EcsEntity, client: EcsEntity,
@ -331,6 +338,7 @@ fn handle_health(
} }
} }
#[allow(clippy::identity_conversion)] // TODO: Pending review in #587
fn handle_alias( fn handle_alias(
server: &mut Server, server: &mut Server,
client: EcsEntity, client: EcsEntity,
@ -377,6 +385,9 @@ fn handle_alias(
} }
} }
#[allow(clippy::collapsible_if)] // TODO: Pending review in #587
#[allow(clippy::identity_conversion)] // TODO: Pending review in #587
#[allow(clippy::useless_format)] // TODO: Pending review in #587
fn handle_tp( fn handle_tp(
server: &mut Server, server: &mut Server,
client: EcsEntity, client: EcsEntity,
@ -428,6 +439,8 @@ fn handle_tp(
} }
} }
#[allow(clippy::identity_conversion)] // TODO: Pending review in #587
#[allow(clippy::redundant_clone)] // TODO: Pending review in #587
fn handle_spawn( fn handle_spawn(
server: &mut Server, server: &mut Server,
client: EcsEntity, client: EcsEntity,
@ -573,6 +586,7 @@ fn handle_build(
} }
} }
#[allow(clippy::identity_conversion)] // TODO: Pending review in #587
fn handle_help( fn handle_help(
server: &mut Server, server: &mut Server,
client: EcsEntity, client: EcsEntity,
@ -624,6 +638,9 @@ fn handle_kill_npcs(
server.notify_client(client, ServerMsg::private(text)); server.notify_client(client, ServerMsg::private(text));
} }
#[allow(clippy::float_cmp)] // TODO: Pending review in #587
#[allow(clippy::needless_return)] // TODO: Pending review in #587
#[allow(clippy::useless_format)] // TODO: Pending review in #587
fn handle_object( fn handle_object(
server: &mut Server, server: &mut Server,
client: EcsEntity, client: EcsEntity,
@ -688,6 +705,7 @@ fn handle_object(
} }
} }
#[allow(clippy::useless_format)] // TODO: Pending review in #587
fn handle_light( fn handle_light(
server: &mut Server, server: &mut Server,
client: EcsEntity, client: EcsEntity,
@ -750,6 +768,7 @@ fn handle_light(
} }
} }
#[allow(clippy::identity_conversion)] // TODO: Pending review in #587
fn handle_lantern( fn handle_lantern(
server: &mut Server, server: &mut Server,
client: EcsEntity, client: EcsEntity,
@ -862,6 +881,7 @@ fn handle_waypoint(
} }
} }
#[allow(clippy::identity_conversion)] // TODO: Pending review in #587
fn handle_adminify( fn handle_adminify(
server: &mut Server, server: &mut Server,
client: EcsEntity, client: EcsEntity,
@ -903,6 +923,8 @@ fn handle_adminify(
} }
} }
#[allow(clippy::identity_conversion)] // TODO: Pending review in #587
#[allow(clippy::useless_format)] // TODO: Pending review in #587
fn handle_tell( fn handle_tell(
server: &mut Server, server: &mut Server,
client: EcsEntity, client: EcsEntity,
@ -987,6 +1009,8 @@ fn handle_debug_column(
} }
#[cfg(feature = "worldgen")] #[cfg(feature = "worldgen")]
#[allow(clippy::blacklisted_name)] // TODO: Pending review in #587
#[allow(clippy::identity_conversion)] // TODO: Pending review in #587
fn handle_debug_column( fn handle_debug_column(
server: &mut Server, server: &mut Server,
client: EcsEntity, client: EcsEntity,
@ -1067,6 +1091,7 @@ spawn_rate {:?} "#,
} }
} }
#[allow(clippy::or_fun_call)] // TODO: Pending review in #587
fn find_target( fn find_target(
ecs: &specs::World, ecs: &specs::World,
opt_alias: Option<String>, opt_alias: Option<String>,
@ -1207,6 +1232,7 @@ fn handle_debug(
} }
} }
#[allow(clippy::identity_conversion)] // TODO: Pending review in #587
fn handle_remove_lights( fn handle_remove_lights(
server: &mut Server, server: &mut Server,
client: EcsEntity, client: EcsEntity,
@ -1258,6 +1284,10 @@ fn handle_remove_lights(
); );
} }
#[allow(clippy::chars_next_cmp)] // TODO: Pending review in #587
#[allow(clippy::identity_conversion)] // TODO: Pending review in #587
#[allow(clippy::or_fun_call)] // TODO: Pending review in #587
#[allow(clippy::useless_format)] // TODO: Pending review in #587
fn handle_sudo( fn handle_sudo(
server: &mut Server, server: &mut Server,
client: EcsEntity, client: EcsEntity,

View File

@ -22,6 +22,7 @@ pub fn handle_create_character(
sys::subscription::initialize_region_subscription(state.ecs(), entity); sys::subscription::initialize_region_subscription(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,

View File

@ -24,6 +24,8 @@ pub fn handle_damage(server: &Server, uid: Uid, change: HealthChange) {
} }
} }
#[allow(clippy::collapsible_if)] // TODO: Pending review in #587
#[allow(clippy::option_map_unit_fn)] // TODO: Pending review in #587
pub fn handle_destroy(server: &mut Server, entity: EcsEntity, cause: HealthSource) { pub fn handle_destroy(server: &mut Server, entity: EcsEntity, cause: HealthSource) {
let state = server.state_mut(); let state = server.state_mut();
@ -333,6 +335,7 @@ pub fn handle_land_on_ground(server: &Server, entity: EcsEntity, vel: Vec3<f32>)
} }
} }
#[allow(clippy::option_map_unit_fn)] // TODO: Pending review in #587
pub fn handle_respawn(server: &Server, entity: EcsEntity) { pub fn handle_respawn(server: &Server, entity: EcsEntity) {
let state = &server.state; let state = &server.state;

View File

@ -48,6 +48,7 @@ pub fn handle_lantern(server: &mut Server, entity: EcsEntity) {
} }
} }
#[allow(clippy::identity_conversion)] // TODO: Pending review in #587
pub fn handle_mount(server: &mut Server, mounter: EcsEntity, mountee: EcsEntity) { pub fn handle_mount(server: &mut Server, mounter: EcsEntity, mountee: EcsEntity) {
let state = server.state_mut(); let state = server.state_mut();
@ -80,6 +81,7 @@ pub fn handle_mount(server: &mut Server, mounter: EcsEntity, mountee: EcsEntity)
} }
} }
#[allow(clippy::option_map_unit_fn)] // TODO: Pending review in #587
pub fn handle_unmount(server: &mut Server, mounter: EcsEntity) { pub fn handle_unmount(server: &mut Server, mounter: EcsEntity) {
let state = server.state_mut(); let state = server.state_mut();
let mountee_entity = state let mountee_entity = state
@ -97,6 +99,8 @@ pub fn handle_unmount(server: &mut Server, mounter: EcsEntity) {
state.delete_component::<comp::Mounting>(mounter); state.delete_component::<comp::Mounting>(mounter);
} }
#[allow(clippy::nonminimal_bool)] // TODO: Pending review in #587
#[allow(clippy::option_map_unit_fn)] // TODO: Pending review in #587
pub fn handle_possess(server: &Server, possessor_uid: Uid, possesse_uid: Uid) { pub fn handle_possess(server: &Server, possessor_uid: Uid, possesse_uid: Uid) {
let state = &server.state; let state = &server.state;
let ecs = state.ecs(); let ecs = state.ecs();

View File

@ -29,6 +29,9 @@ pub fn snuff_lantern(storage: &mut WriteStorage<comp::LightEmitter>, entity: Ecs
storage.remove(entity); storage.remove(entity);
} }
#[allow(clippy::block_in_if_condition_stmt)] // TODO: Pending review in #587
#[allow(clippy::collapsible_if)] // TODO: Pending review in #587
#[allow(clippy::let_and_return)] // TODO: Pending review in #587
pub fn handle_inventory(server: &mut Server, entity: EcsEntity, manip: comp::InventoryManip) { pub fn handle_inventory(server: &mut Server, entity: EcsEntity, manip: comp::InventoryManip) {
let state = server.state_mut(); let state = server.state_mut();
let mut dropped_items = Vec::new(); let mut dropped_items = Vec::new();

View File

@ -87,6 +87,8 @@ pub struct Server {
impl Server { impl Server {
/// Create a new `Server` /// Create a new `Server`
#[allow(clippy::expect_fun_call)] // TODO: Pending review in #587
#[allow(clippy::needless_update)] // TODO: Pending review in #587
pub fn new(settings: ServerSettings) -> Result<Self, Error> { pub fn new(settings: ServerSettings) -> Result<Self, Error> {
let mut state = State::default(); let mut state = State::default();
state.ecs_mut().insert(EventBus::<ServerEvent>::default()); state.ecs_mut().insert(EventBus::<ServerEvent>::default());

View File

@ -34,6 +34,7 @@ pub struct ServerMetrics {
} }
impl TickMetrics { impl TickMetrics {
#[allow(clippy::identity_conversion)] // TODO: Pending review in #587
pub fn new(registry: &Registry, tick: Arc<AtomicU64>) -> Result<Self, Box<dyn Error>> { pub fn new(registry: &Registry, tick: Arc<AtomicU64>) -> Result<Self, Box<dyn Error>> {
let player_online = IntGauge::with_opts(Opts::new( let player_online = IntGauge::with_opts(Opts::new(
"player_online", "player_online",
@ -102,6 +103,7 @@ impl TickMetrics {
} }
impl ServerMetrics { impl ServerMetrics {
#[allow(clippy::new_without_default)] // TODO: Pending review in #587
pub fn new() -> Self { pub fn new() -> Self {
let running = Arc::new(AtomicBool::new(false)); let running = Arc::new(AtomicBool::new(false));
let tick = Arc::new(AtomicU64::new(0)); let tick = Arc::new(AtomicU64::new(0));

View File

@ -23,6 +23,7 @@ type CharacterListResult = Result<Vec<CharacterItem>, Error>;
/// ///
/// After first logging in, and after a character is selected, we fetch this /// After first logging in, and after a character is selected, we fetch this
/// data for the purpose of inserting their persisted data for the entity. /// data for the purpose of inserting their persisted data for the entity.
#[allow(clippy::redundant_closure)] // TODO: Pending review in #587
pub fn load_character_data( pub fn load_character_data(
character_id: i32, character_id: i32,
db_dir: &str, db_dir: &str,
@ -101,6 +102,7 @@ pub fn load_character_data(
/// In the event that a join fails, for a character (i.e. they lack an entry for /// In the event that a join fails, for a character (i.e. they lack an entry for
/// stats, body, etc...) the character is skipped, and no entry will be /// stats, body, etc...) the character is skipped, and no entry will be
/// returned. /// returned.
#[allow(clippy::redundant_closure)] // TODO: Pending review in #587
pub fn load_character_list(player_uuid: &str, db_dir: &str) -> CharacterListResult { pub fn load_character_list(player_uuid: &str, db_dir: &str) -> CharacterListResult {
let data = schema::character::dsl::character let data = schema::character::dsl::character
.filter(schema::character::player_uuid.eq(player_uuid)) .filter(schema::character::player_uuid.eq(player_uuid))

View File

@ -46,6 +46,7 @@ fn establish_connection(db_dir: &str) -> SqliteConnection {
connection connection
} }
#[allow(clippy::single_match)] // TODO: Pending review in #587
fn apply_saves_dir_override(db_dir: &str) -> String { fn apply_saves_dir_override(db_dir: &str) -> String {
if let Some(val) = env::var_os("VELOREN_SAVES_DIR") { if let Some(val) = env::var_os("VELOREN_SAVES_DIR") {
let path = PathBuf::from(val); let path = PathBuf::from(val);

View File

@ -63,6 +63,7 @@ impl Default for ServerSettings {
} }
impl ServerSettings { impl ServerSettings {
#[allow(clippy::single_match)] // TODO: Pending review in #587
pub fn load() -> Self { pub fn load() -> Self {
let path = ServerSettings::get_settings_path(); let path = ServerSettings::get_settings_path();

View File

@ -65,6 +65,7 @@ impl StateExt for State {
success success
} }
#[allow(clippy::option_map_unit_fn)] // TODO: Pending review in #587
fn apply_effect(&mut self, entity: EcsEntity, effect: Effect) { fn apply_effect(&mut self, entity: EcsEntity, effect: Effect) {
match effect { match effect {
Effect::Health(change) => { Effect::Health(change) => {
@ -152,6 +153,7 @@ impl StateExt for State {
.with(comp::Sticky) .with(comp::Sticky)
} }
#[allow(clippy::unnecessary_operation)] // TODO: Pending review in #587
fn create_player_character( fn create_player_character(
&mut self, &mut self,
entity: EcsEntity, entity: EcsEntity,

View File

@ -20,6 +20,7 @@ use specs::{
/// This system will send physics updates to the client /// This system will send physics updates to the client
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
type SystemData = ( type SystemData = (
Entities<'a>, Entities<'a>,
Read<'a, Tick>, Read<'a, Tick>,
@ -43,6 +44,7 @@ impl<'a> System<'a> for Sys {
ReadTrackers<'a>, ReadTrackers<'a>,
); );
#[allow(clippy::redundant_closure)] // TODO: Pending review in #587
fn run( fn run(
&mut self, &mut self,
( (

View File

@ -26,6 +26,7 @@ use specs::{
/// This system will handle new messages from clients /// This system will handle new messages from clients
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
type SystemData = ( type SystemData = (
Entities<'a>, Entities<'a>,
Read<'a, EventBus<ServerEvent>>, Read<'a, EventBus<ServerEvent>>,
@ -49,6 +50,10 @@ impl<'a> System<'a> for Sys {
WriteStorage<'a, SpeechBubble>, WriteStorage<'a, SpeechBubble>,
); );
#[allow(clippy::match_ref_pats)] // TODO: Pending review in #587
#[allow(clippy::option_map_unit_fn)] // TODO: Pending review in #587
#[allow(clippy::single_char_pattern)] // TODO: Pending review in #587
#[allow(clippy::single_match)] // TODO: Pending review in #587
fn run( fn run(
&mut self, &mut self,
( (

View File

@ -8,6 +8,7 @@ use specs::{Join, ReadExpect, ReadStorage, System, Write};
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
type SystemData = ( type SystemData = (
ReadStorage<'a, Player>, ReadStorage<'a, Player>,
ReadStorage<'a, Stats>, ReadStorage<'a, Stats>,

View File

@ -57,6 +57,7 @@ pub struct TrackedComps<'a> {
pub speech_bubble: ReadStorage<'a, SpeechBubble>, pub speech_bubble: ReadStorage<'a, SpeechBubble>,
} }
impl<'a> TrackedComps<'a> { impl<'a> TrackedComps<'a> {
#[allow(clippy::option_map_unit_fn)] // TODO: Pending review in #587
pub fn create_entity_package( pub fn create_entity_package(
&self, &self,
entity: EcsEntity, entity: EcsEntity,

View File

@ -21,6 +21,7 @@ use vek::*;
/// This system will update region subscriptions based on client positions /// This system will update region subscriptions based on client positions
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
type SystemData = ( type SystemData = (
Entities<'a>, Entities<'a>,
ReadExpect<'a, RegionMap>, ReadExpect<'a, RegionMap>,
@ -36,6 +37,8 @@ impl<'a> System<'a> for Sys {
TrackedComps<'a>, TrackedComps<'a>,
); );
#[allow(clippy::block_in_if_condition_stmt)] // TODO: Pending review in #587
#[allow(clippy::clone_on_copy)] // TODO: Pending review in #587
fn run( fn run(
&mut self, &mut self,
( (

View File

@ -23,6 +23,7 @@ use vek::*;
/// 4. Removes chunks outside the range of players /// 4. Removes chunks outside the range of players
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
type SystemData = ( type SystemData = (
Read<'a, EventBus<ServerEvent>>, Read<'a, EventBus<ServerEvent>>,
Read<'a, Tick>, Read<'a, Tick>,
@ -35,6 +36,9 @@ impl<'a> System<'a> for Sys {
WriteStorage<'a, Client>, WriteStorage<'a, Client>,
); );
#[allow(clippy::identity_conversion)] // TODO: Pending review in #587
#[allow(clippy::manual_saturating_arithmetic)] // TODO: Pending review in #587
#[allow(clippy::or_fun_call)] // TODO: Pending review in #587
fn run( fn run(
&mut self, &mut self,
( (
@ -394,6 +398,8 @@ impl<'a> System<'a> for Sys {
} }
} }
#[allow(clippy::identity_conversion)] // TODO: Pending review in #587
#[allow(clippy::manual_saturating_arithmetic)] // TODO: Pending review in #587
pub fn chunk_in_vd( pub fn chunk_in_vd(
player_pos: Vec3<f32>, player_pos: Vec3<f32>,
chunk_pos: Vec2<i32>, chunk_pos: Vec2<i32>,

View File

@ -12,6 +12,7 @@ use specs::{Join, Read, ReadExpect, ReadStorage, System, Write, WriteStorage};
/// chunks /// chunks
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
type SystemData = ( type SystemData = (
ReadExpect<'a, TerrainGrid>, ReadExpect<'a, TerrainGrid>,
Read<'a, TerrainChanges>, Read<'a, TerrainChanges>,

View File

@ -14,6 +14,7 @@ const NOTIFY_TIME: f64 = 10.0;
/// TODO: Make this faster by only considering local waypoints /// TODO: Make this faster by only considering local waypoints
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
type SystemData = ( type SystemData = (
Entities<'a>, Entities<'a>,
ReadStorage<'a, Pos>, ReadStorage<'a, Pos>,

View File

@ -11,6 +11,7 @@ use world::{sim, World};
const CENTER: Vec2<i32> = Vec2 { x: 512, y: 512 }; const CENTER: Vec2<i32> = Vec2 { x: 512, y: 512 };
const GEN_SIZE: i32 = 4; const GEN_SIZE: i32 = 4;
#[allow(clippy::needless_update)] // TODO: Pending review in #587
pub fn criterion_benchmark(c: &mut Criterion) { pub fn criterion_benchmark(c: &mut Criterion) {
// Generate chunks here to test // Generate chunks here to test
let mut terrain = TerrainGrid::new().unwrap(); let mut terrain = TerrainGrid::new().unwrap();

View File

@ -3,6 +3,7 @@ use gfx_window_glutin::init_headless;
use vek::*; use vek::*;
use veloren_voxygen::{render, scene::simple as scene}; use veloren_voxygen::{render, scene::simple as scene};
#[allow(clippy::clone_on_copy)] // TODO: Pending review in #587
fn main() { fn main() {
// Setup renderer // Setup renderer
let dim = (200u16, 300u16, 1, gfx::texture::AaMode::Single); let dim = (200u16, 300u16, 1, gfx::texture::AaMode::Single);

View File

@ -19,6 +19,7 @@ pub struct BirdSmallSkeleton {
} }
impl BirdSmallSkeleton { impl BirdSmallSkeleton {
#[allow(clippy::new_without_default)] // TODO: Pending review in #587
pub fn new() -> Self { pub fn new() -> Self {
Self { Self {
head: Bone::default(), head: Bone::default(),

View File

@ -9,6 +9,7 @@ impl Animation for AlphaAnimation {
type Dependency = (Option<ToolKind>, f32, f64); type Dependency = (Option<ToolKind>, f32, f64);
type Skeleton = CharacterSkeleton; type Skeleton = CharacterSkeleton;
#[allow(clippy::approx_constant)] // TODO: Pending review in #587
fn update_skeleton( fn update_skeleton(
skeleton: &Self::Skeleton, skeleton: &Self::Skeleton,
(active_tool_kind, velocity, _global_time): Self::Dependency, (active_tool_kind, velocity, _global_time): Self::Dependency,

View File

@ -9,6 +9,8 @@ impl Animation for ChargeAnimation {
type Dependency = (Option<ToolKind>, f32, Vec3<f32>, Vec3<f32>, f64); type Dependency = (Option<ToolKind>, f32, Vec3<f32>, Vec3<f32>, f64);
type Skeleton = CharacterSkeleton; type Skeleton = CharacterSkeleton;
#[allow(clippy::approx_constant)] // TODO: Pending review in #587
#[allow(clippy::identity_conversion)] // TODO: Pending review in #587
fn update_skeleton( fn update_skeleton(
skeleton: &Self::Skeleton, skeleton: &Self::Skeleton,
(active_tool_kind, velocity, orientation, last_ori, _global_time): Self::Dependency, (active_tool_kind, velocity, orientation, last_ori, _global_time): Self::Dependency,

View File

@ -11,6 +11,7 @@ impl Animation for DashAnimation {
type Dependency = (Option<ToolKind>, f64); type Dependency = (Option<ToolKind>, f64);
type Skeleton = CharacterSkeleton; type Skeleton = CharacterSkeleton;
#[allow(clippy::single_match)] // TODO: Pending review in #587
fn update_skeleton( fn update_skeleton(
skeleton: &Self::Skeleton, skeleton: &Self::Skeleton,
(active_tool_kind, _global_time): Self::Dependency, (active_tool_kind, _global_time): Self::Dependency,

View File

@ -10,6 +10,7 @@ impl Animation for EquipAnimation {
type Dependency = (Option<ToolKind>, f32, f64); type Dependency = (Option<ToolKind>, f32, f64);
type Skeleton = CharacterSkeleton; type Skeleton = CharacterSkeleton;
#[allow(clippy::approx_constant)] // TODO: Pending review in #587
fn update_skeleton( fn update_skeleton(
skeleton: &Self::Skeleton, skeleton: &Self::Skeleton,
(active_tool_kind, velocity, global_time): Self::Dependency, (active_tool_kind, velocity, global_time): Self::Dependency,

View File

@ -9,6 +9,7 @@ impl Animation for GlidingAnimation {
type Dependency = (Option<ToolKind>, Vec3<f32>, Vec3<f32>, Vec3<f32>, f64); type Dependency = (Option<ToolKind>, Vec3<f32>, Vec3<f32>, Vec3<f32>, f64);
type Skeleton = CharacterSkeleton; type Skeleton = CharacterSkeleton;
#[allow(clippy::identity_conversion)] // TODO: Pending review in #587
fn update_skeleton( fn update_skeleton(
skeleton: &Self::Skeleton, skeleton: &Self::Skeleton,
(_active_tool_kind, velocity, orientation, last_ori, global_time): Self::Dependency, (_active_tool_kind, velocity, orientation, last_ori, global_time): Self::Dependency,

View File

@ -7,6 +7,7 @@ impl Animation for JumpAnimation {
type Dependency = (Option<ToolKind>, Vec3<f32>, Vec3<f32>, f64); type Dependency = (Option<ToolKind>, Vec3<f32>, Vec3<f32>, f64);
type Skeleton = CharacterSkeleton; type Skeleton = CharacterSkeleton;
#[allow(clippy::identity_conversion)] // TODO: Pending review in #587
fn update_skeleton( fn update_skeleton(
skeleton: &Self::Skeleton, skeleton: &Self::Skeleton,
(_active_tool_kind, orientation, last_ori, global_time): Self::Dependency, (_active_tool_kind, orientation, last_ori, global_time): Self::Dependency,

View File

@ -202,6 +202,7 @@ impl SkeletonAttr {
} }
impl<'a> From<&'a comp::humanoid::Body> for SkeletonAttr { impl<'a> From<&'a comp::humanoid::Body> for SkeletonAttr {
#[allow(clippy::match_single_binding)] // TODO: Pending review in #587
fn from(body: &'a comp::humanoid::Body) -> Self { fn from(body: &'a comp::humanoid::Body) -> Self {
use comp::humanoid::{BodyType::*, Species::*}; use comp::humanoid::{BodyType::*, Species::*};
Self { Self {

View File

@ -8,6 +8,7 @@ impl Animation for RollAnimation {
type Dependency = (Option<ToolKind>, Vec3<f32>, Vec3<f32>, f64); type Dependency = (Option<ToolKind>, Vec3<f32>, Vec3<f32>, f64);
type Skeleton = CharacterSkeleton; type Skeleton = CharacterSkeleton;
#[allow(clippy::identity_conversion)] // TODO: Pending review in #587
fn update_skeleton( fn update_skeleton(
skeleton: &Self::Skeleton, skeleton: &Self::Skeleton,
(_active_tool_kind, orientation, last_ori, _global_time): Self::Dependency, (_active_tool_kind, orientation, last_ori, _global_time): Self::Dependency,

View File

@ -9,6 +9,7 @@ impl Animation for RunAnimation {
type Dependency = (Option<ToolKind>, Vec3<f32>, Vec3<f32>, Vec3<f32>, f64); type Dependency = (Option<ToolKind>, Vec3<f32>, Vec3<f32>, Vec3<f32>, f64);
type Skeleton = CharacterSkeleton; type Skeleton = CharacterSkeleton;
#[allow(clippy::identity_conversion)] // TODO: Pending review in #587
fn update_skeleton( fn update_skeleton(
skeleton: &Self::Skeleton, skeleton: &Self::Skeleton,
(_active_tool_kind, velocity, orientation, last_ori, global_time): Self::Dependency, (_active_tool_kind, velocity, orientation, last_ori, global_time): Self::Dependency,

View File

@ -8,6 +8,7 @@ impl Animation for ShootAnimation {
type Dependency = (Option<ToolKind>, f32, f64); type Dependency = (Option<ToolKind>, f32, f64);
type Skeleton = CharacterSkeleton; type Skeleton = CharacterSkeleton;
#[allow(clippy::approx_constant)] // TODO: Pending review in #587
fn update_skeleton( fn update_skeleton(
skeleton: &Self::Skeleton, skeleton: &Self::Skeleton,
(active_tool_kind, velocity, _global_time): Self::Dependency, (active_tool_kind, velocity, _global_time): Self::Dependency,

View File

@ -9,6 +9,7 @@ impl Animation for SwimAnimation {
type Dependency = (Option<ToolKind>, Vec3<f32>, Vec3<f32>, Vec3<f32>, f64); type Dependency = (Option<ToolKind>, Vec3<f32>, Vec3<f32>, Vec3<f32>, f64);
type Skeleton = CharacterSkeleton; type Skeleton = CharacterSkeleton;
#[allow(clippy::identity_conversion)] // TODO: Pending review in #587
fn update_skeleton( fn update_skeleton(
skeleton: &Self::Skeleton, skeleton: &Self::Skeleton,
(_active_tool_kind, velocity, orientation, last_ori, global_time): Self::Dependency, (_active_tool_kind, velocity, orientation, last_ori, global_time): Self::Dependency,

View File

@ -9,6 +9,7 @@ impl Animation for WieldAnimation {
type Dependency = (Option<ToolKind>, f32, f64); type Dependency = (Option<ToolKind>, f32, f64);
type Skeleton = CharacterSkeleton; type Skeleton = CharacterSkeleton;
#[allow(clippy::approx_constant)] // TODO: Pending review in #587
fn update_skeleton( fn update_skeleton(
skeleton: &Self::Skeleton, skeleton: &Self::Skeleton,
(active_tool_kind, velocity, global_time): Self::Dependency, (active_tool_kind, velocity, global_time): Self::Dependency,

View File

@ -80,6 +80,7 @@ impl<'a> std::convert::TryFrom<&'a comp::Body> for CritterAttr {
} }
impl CritterAttr { impl CritterAttr {
#[allow(clippy::match_single_binding)] // TODO: Pending review in #587
pub fn calculate_scale(body: &comp::critter::Body) -> f32 { pub fn calculate_scale(body: &comp::critter::Body) -> f32 {
match (body.species, body.body_type) { match (body.species, body.body_type) {
(_, _) => 0.0, (_, _) => 0.0,

View File

@ -21,6 +21,7 @@ pub struct FishMediumSkeleton {
} }
impl FishMediumSkeleton { impl FishMediumSkeleton {
#[allow(clippy::new_without_default)] // TODO: Pending review in #587
pub fn new() -> Self { pub fn new() -> Self {
Self { Self {
head: Bone::default(), head: Bone::default(),

View File

@ -17,6 +17,7 @@ pub struct FishSmallSkeleton {
} }
impl FishSmallSkeleton { impl FishSmallSkeleton {
#[allow(clippy::new_without_default)] // TODO: Pending review in #587
pub fn new() -> Self { pub fn new() -> Self {
Self { Self {
torso: Bone::default(), torso: Bone::default(),

View File

@ -8,6 +8,7 @@ pub struct FixtureSkeleton;
pub struct SkeletonAttr; pub struct SkeletonAttr;
impl FixtureSkeleton { impl FixtureSkeleton {
#[allow(clippy::new_without_default)] // TODO: Pending review in #587
pub fn new() -> Self { Self {} } pub fn new() -> Self { Self {} }
} }

View File

@ -26,6 +26,7 @@ pub struct GolemSkeleton {
} }
impl GolemSkeleton { impl GolemSkeleton {
#[allow(clippy::new_without_default)] // TODO: Pending review in #587
pub fn new() -> Self { pub fn new() -> Self {
Self { Self {
head: Bone::default(), head: Bone::default(),

View File

@ -7,6 +7,7 @@ pub struct ObjectSkeleton;
pub struct SkeletonAttr; pub struct SkeletonAttr;
impl ObjectSkeleton { impl ObjectSkeleton {
#[allow(clippy::new_without_default)] // TODO: Pending review in #587
pub fn new() -> Self { Self {} } pub fn new() -> Self { Self {} }
} }

View File

@ -50,6 +50,7 @@ impl Fader {
} }
} }
#[allow(clippy::assign_op_pattern)] // TODO: Pending review in #587
pub fn update(&mut self, dt: f32) { pub fn update(&mut self, dt: f32) {
if self.is_running { if self.is_running {
self.running_time = self.running_time + dt; self.running_time = self.running_time + dt;
@ -103,6 +104,7 @@ mod tests {
} }
#[test] #[test]
#[allow(clippy::float_cmp)] // TODO: Pending review in #587
fn fade_out_completes() { fn fade_out_completes() {
let mut fader = Fader::fade_out(10.0, 1.0); let mut fader = Fader::fade_out(10.0, 1.0);
@ -146,6 +148,7 @@ mod tests {
} }
#[test] #[test]
#[allow(clippy::float_cmp)] // TODO: Pending review in #587
fn update_target_volume_fading_in_when_currently_above() { fn update_target_volume_fading_in_when_currently_above() {
let mut fader = Fader::fade_in(10.0, 1.0); let mut fader = Fader::fade_in(10.0, 1.0);
@ -162,6 +165,7 @@ mod tests {
} }
#[test] #[test]
#[allow(clippy::float_cmp)] // TODO: Pending review in #587
fn update_target_volume_fading_in_when_currently_below() { fn update_target_volume_fading_in_when_currently_below() {
let mut fader = Fader::fade_in(20.0, 1.0); let mut fader = Fader::fade_in(20.0, 1.0);

View File

@ -36,6 +36,7 @@ pub struct AudioFrontend {
impl AudioFrontend { impl AudioFrontend {
/// Construct with given device /// Construct with given device
#[allow(clippy::redundant_clone)] // TODO: Pending review in #587
pub fn new(device: String, max_sfx_channels: usize) -> Self { pub fn new(device: String, max_sfx_channels: usize) -> Self {
let mut sfx_channels = Vec::with_capacity(max_sfx_channels); let mut sfx_channels = Vec::with_capacity(max_sfx_channels);
let audio_device = get_device_raw(&device); let audio_device = get_device_raw(&device);
@ -165,6 +166,7 @@ impl AudioFrontend {
} }
} }
#[allow(clippy::clone_on_copy)] // TODO: Pending review in #587
pub fn set_listener_pos(&mut self, pos: &Vec3<f32>, ori: &Vec3<f32>) { pub fn set_listener_pos(&mut self, pos: &Vec3<f32>, ori: &Vec3<f32>) {
self.listener_pos = pos.clone(); self.listener_pos = pos.clone();
self.listener_ori = ori.normalized(); self.listener_ori = ori.normalized();

View File

@ -34,6 +34,7 @@ pub struct MusicMgr {
} }
impl MusicMgr { impl MusicMgr {
#[allow(clippy::new_without_default)] // TODO: Pending review in #587
pub fn new() -> Self { pub fn new() -> Self {
Self { Self {
soundtrack: Self::load_soundtrack_items(), soundtrack: Self::load_soundtrack_items(),

View File

@ -39,6 +39,7 @@ pub struct CombatEventMapper {
} }
impl EventMapper for CombatEventMapper { impl EventMapper for CombatEventMapper {
#[allow(clippy::redundant_closure)] // TODO: Pending review in #587
fn maintain(&mut self, state: &State, player_entity: EcsEntity, triggers: &SfxTriggers) { fn maintain(&mut self, state: &State, player_entity: EcsEntity, triggers: &SfxTriggers) {
let ecs = state.ecs(); let ecs = state.ecs();
@ -128,6 +129,7 @@ impl CombatEventMapper {
} }
} }
#[allow(clippy::collapsible_if)] // TODO: Pending review in #587
fn map_event( fn map_event(
character_state: &CharacterState, character_state: &CharacterState,
previous_state: &PreviousEntityState, previous_state: &PreviousEntityState,

View File

@ -36,6 +36,7 @@ pub struct MovementEventMapper {
} }
impl EventMapper for MovementEventMapper { impl EventMapper for MovementEventMapper {
#[allow(clippy::redundant_closure)] // TODO: Pending review in #587
fn maintain(&mut self, state: &State, player_entity: EcsEntity, triggers: &SfxTriggers) { fn maintain(&mut self, state: &State, player_entity: EcsEntity, triggers: &SfxTriggers) {
let ecs = state.ecs(); let ecs = state.ecs();
@ -145,6 +146,7 @@ impl MovementEventMapper {
/// as opening or closing the glider. These methods translate those /// as opening or closing the glider. These methods translate those
/// entity states with some additional data into more specific /// entity states with some additional data into more specific
/// `SfxEvent`'s which we attach sounds to /// `SfxEvent`'s which we attach sounds to
#[allow(clippy::nonminimal_bool)] // TODO: Pending review in #587
fn map_movement_event( fn map_movement_event(
character_state: &CharacterState, character_state: &CharacterState,
physics_state: &PhysicsState, physics_state: &PhysicsState,

View File

@ -26,6 +26,7 @@ pub struct ProgressionEventMapper {
} }
impl EventMapper for ProgressionEventMapper { impl EventMapper for ProgressionEventMapper {
#[allow(clippy::op_ref)] // TODO: Pending review in #587
fn maintain(&mut self, state: &State, player_entity: specs::Entity, triggers: &SfxTriggers) { fn maintain(&mut self, state: &State, player_entity: specs::Entity, triggers: &SfxTriggers) {
let ecs = state.ecs(); let ecs = state.ecs();
@ -59,6 +60,7 @@ impl ProgressionEventMapper {
} }
} }
#[allow(clippy::let_and_return)] // TODO: Pending review in #587
fn map_event(&mut self, next_state: &ProgressionState) -> Option<SfxEvent> { fn map_event(&mut self, next_state: &ProgressionState) -> Option<SfxEvent> {
let sfx_event = if next_state.level > self.state.level { let sfx_event = if next_state.level > self.state.level {
Some(SfxEvent::LevelUp) Some(SfxEvent::LevelUp)

View File

@ -125,6 +125,7 @@ pub struct SfxMgr {
} }
impl SfxMgr { impl SfxMgr {
#[allow(clippy::new_without_default)] // TODO: Pending review in #587
pub fn new() -> Self { pub fn new() -> Self {
Self { Self {
triggers: Self::load_sfx_items(), triggers: Self::load_sfx_items(),

View File

@ -1,6 +1,5 @@
use common::assets; use common::assets;
use hashbrown::HashMap; use hashbrown::HashMap;
use rodio;
use std::{convert::AsRef, io, io::Read, sync::Arc}; use std::{convert::AsRef, io, io::Read, sync::Arc};
// Implementation of sound taken from this github issue: // Implementation of sound taken from this github issue:
@ -31,6 +30,7 @@ pub struct SoundCache {
} }
impl SoundCache { impl SoundCache {
#[allow(clippy::new_without_default)] // TODO: Pending review in #587
pub fn new() -> Self { pub fn new() -> Self {
Self { Self {
sounds: HashMap::new(), sounds: HashMap::new(),

View File

@ -16,6 +16,7 @@ pub const MY_EXP_SHOWTIME: f32 = 4.0;
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
type SystemData = ( type SystemData = (
Entities<'a>, Entities<'a>,
ReadExpect<'a, MyEntity>, ReadExpect<'a, MyEntity>,
@ -27,6 +28,8 @@ impl<'a> System<'a> for Sys {
WriteStorage<'a, HpFloaterList>, WriteStorage<'a, HpFloaterList>,
); );
#[allow(clippy::block_in_if_condition_stmt)] // TODO: Pending review in #587
#[allow(clippy::option_map_unit_fn)] // TODO: Pending review in #587
fn run( fn run(
&mut self, &mut self,
(entities, my_entity, dt, mut my_exp_floater_list, uids, pos, stats, mut hp_floater_lists): Self::SystemData, (entities, my_entity, dt, mut my_exp_floater_list, uids, pos, stats, mut hp_floater_lists): Self::SystemData,

View File

@ -11,6 +11,7 @@ use vek::*;
/// This system will allow NPCs to modify their controller /// This system will allow NPCs to modify their controller
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
type SystemData = ( type SystemData = (
Entities<'a>, Entities<'a>,
Read<'a, DeltaTime>, Read<'a, DeltaTime>,
@ -20,6 +21,7 @@ impl<'a> System<'a> for Sys {
WriteStorage<'a, Interpolated>, WriteStorage<'a, Interpolated>,
); );
#[allow(clippy::option_map_unit_fn)] // TODO: Pending review in #587
fn run( fn run(
&mut self, &mut self,
(entities, dt, positions, orientations, velocities, mut interpolated): Self::SystemData, (entities, dt, positions, orientations, velocities, mut interpolated): Self::SystemData,

View File

@ -1,5 +1,4 @@
use crate::render::RenderError; use crate::render::RenderError;
use client;
use std::fmt::Debug; use std::fmt::Debug;
/// Represents any error that may be triggered by Voxygen. /// Represents any error that may be triggered by Voxygen.

View File

@ -99,6 +99,7 @@ pub struct Bag<'a> {
} }
impl<'a> Bag<'a> { impl<'a> Bag<'a> {
#[allow(clippy::too_many_arguments)] // TODO: Pending review in #587
pub fn new( pub fn new(
client: &'a Client, client: &'a Client,
imgs: &'a Imgs, imgs: &'a Imgs,
@ -149,8 +150,10 @@ impl<'a> Widget for Bag<'a> {
} }
} }
#[allow(clippy::unused_unit)] // TODO: Pending review in #587
fn style(&self) -> Self::Style { () } fn style(&self) -> Self::Style { () }
#[allow(clippy::useless_format)] // TODO: Pending review in #587
fn update(self, args: widget::UpdateArgs<Self>) -> Self::Event { fn update(self, args: widget::UpdateArgs<Self>) -> Self::Event {
let widget::UpdateArgs { state, ui, .. } = args; let widget::UpdateArgs { state, ui, .. } = args;

View File

@ -56,6 +56,7 @@ 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,6 +106,7 @@ impl<'a> Widget for Buttons<'a> {
} }
} }
#[allow(clippy::unused_unit)] // TODO: Pending review in #587
fn style(&self) -> Self::Style { () } fn style(&self) -> Self::Style { () }
fn update(self, args: widget::UpdateArgs<Self>) -> Self::Event { fn update(self, args: widget::UpdateArgs<Self>) -> Self::Event {

View File

@ -143,8 +143,12 @@ impl<'a> Widget for Chat<'a> {
} }
} }
#[allow(clippy::unused_unit)] // TODO: Pending review in #587
fn style(&self) -> Self::Style { () } fn style(&self) -> Self::Style { () }
#[allow(clippy::collapsible_if)] // TODO: Pending review in #587
#[allow(clippy::redundant_clone)] // TODO: Pending review in #587
#[allow(clippy::single_match)] // TODO: Pending review in #587
fn update(self, args: widget::UpdateArgs<Self>) -> Self::Event { fn update(self, args: widget::UpdateArgs<Self>) -> Self::Event {
let widget::UpdateArgs { id, state, ui, .. } = args; let widget::UpdateArgs { id, state, ui, .. } = args;
let transp = self.global_state.settings.gameplay.chat_transp; let transp = self.global_state.settings.gameplay.chat_transp;

View File

@ -67,6 +67,7 @@ impl<'a> Widget for EscMenu<'a> {
} }
} }
#[allow(clippy::unused_unit)] // TODO: Pending review in #587
fn style(&self) -> Self::Style { () } fn style(&self) -> Self::Style { () }
fn update(self, args: widget::UpdateArgs<Self>) -> Self::Event { fn update(self, args: widget::UpdateArgs<Self>) -> Self::Event {

View File

@ -28,6 +28,7 @@ pub enum ItemKey {
Empty, Empty,
} }
impl From<&Item> for ItemKey { impl From<&Item> for ItemKey {
#[allow(clippy::clone_on_copy)] // TODO: Pending review in #587
fn from(item: &Item) -> Self { fn from(item: &Item) -> Self {
match &item.kind { match &item.kind {
ItemKind::Tool(Tool { kind, .. }) => ItemKey::Tool(kind.clone()), ItemKind::Tool(Tool { kind, .. }) => ItemKey::Tool(kind.clone()),

View File

@ -46,6 +46,7 @@ pub struct Map<'a> {
localized_strings: &'a std::sync::Arc<VoxygenLocalization>, localized_strings: &'a std::sync::Arc<VoxygenLocalization>,
} }
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,
@ -89,8 +90,10 @@ impl<'a> Widget for Map<'a> {
} }
} }
#[allow(clippy::unused_unit)] // TODO: Pending review in #587
fn style(&self) -> Self::Style { () } fn style(&self) -> Self::Style { () }
#[allow(clippy::useless_format)] // TODO: Pending review in #587
fn update(self, args: widget::UpdateArgs<Self>) -> Self::Event { fn update(self, args: widget::UpdateArgs<Self>) -> Self::Event {
let widget::UpdateArgs { state, ui, .. } = args; let widget::UpdateArgs { state, ui, .. } = args;

View File

@ -92,6 +92,7 @@ impl<'a> Widget for MiniMap<'a> {
} }
} }
#[allow(clippy::unused_unit)] // TODO: Pending review in #587
fn style(&self) -> Self::Style { () } fn style(&self) -> Self::Style { () }
fn update(self, args: widget::UpdateArgs<Self>) -> Self::Event { fn update(self, args: widget::UpdateArgs<Self>) -> Self::Event {

View File

@ -553,6 +553,9 @@ impl Hud {
.expect("Impossible to load fonts!"); .expect("Impossible to load fonts!");
} }
#[allow(clippy::assign_op_pattern)] // TODO: Pending review in #587
#[allow(clippy::option_map_unit_fn)] // TODO: Pending review in #587
#[allow(clippy::single_match)] // TODO: Pending review in #587
fn update_layout( fn update_layout(
&mut self, &mut self,
client: &Client, client: &Client,
@ -1906,6 +1909,7 @@ impl Hud {
} }
} }
#[allow(clippy::option_map_unit_fn)] // TODO: Pending review in #587
pub fn handle_event(&mut self, event: WinEvent, global_state: &mut GlobalState) -> bool { pub fn handle_event(&mut self, event: WinEvent, global_state: &mut GlobalState) -> bool {
// Helper // Helper
fn handle_slot( fn handle_slot(
@ -2132,6 +2136,7 @@ impl Hud {
handled handled
} }
#[allow(clippy::block_in_if_condition_stmt)] // TODO: Pending review in #587
pub fn maintain( pub fn maintain(
&mut self, &mut self,
client: &Client, client: &Client,

View File

@ -60,6 +60,7 @@ pub struct Overhead<'a> {
} }
impl<'a> Overhead<'a> { impl<'a> Overhead<'a> {
#[allow(clippy::too_many_arguments)] // TODO: Pending review in #587
pub fn new( pub fn new(
name: &'a str, name: &'a str,
bubble: Option<&'a SpeechBubble>, bubble: Option<&'a SpeechBubble>,
@ -117,6 +118,7 @@ impl<'a> Widget for Overhead<'a> {
} }
} }
#[allow(clippy::unused_unit)] // TODO: Pending review in #587
fn style(&self) -> Self::Style { () } fn style(&self) -> Self::Style { () }
fn update(self, args: widget::UpdateArgs<Self>) -> Self::Event { fn update(self, args: widget::UpdateArgs<Self>) -> Self::Event {

View File

@ -80,8 +80,10 @@ impl<'a> Widget for Popup<'a> {
} }
} }
#[allow(clippy::unused_unit)] // TODO: Pending review in #587
fn style(&self) -> Self::Style { () } fn style(&self) -> Self::Style { () }
#[allow(clippy::single_match)] // TODO: Pending review in #587
fn update(self, args: widget::UpdateArgs<Self>) -> Self::Event { fn update(self, args: widget::UpdateArgs<Self>) -> Self::Event {
let widget::UpdateArgs { state, ui, .. } = args; let widget::UpdateArgs { state, ui, .. } = args;

View File

@ -265,6 +265,7 @@ impl<'a> Widget for SettingsWindow<'a> {
} }
} }
#[allow(clippy::unused_unit)] // TODO: Pending review in #587
fn style(&self) -> Self::Style { () } fn style(&self) -> Self::Style { () }
fn update(self, args: widget::UpdateArgs<Self>) -> Self::Event { fn update(self, args: widget::UpdateArgs<Self>) -> Self::Event {

View File

@ -139,6 +139,7 @@ pub struct Skillbar<'a> {
} }
impl<'a> Skillbar<'a> { impl<'a> Skillbar<'a> {
#[allow(clippy::too_many_arguments)] // TODO: Pending review in #587
pub fn new( pub fn new(
global_state: &'a GlobalState, global_state: &'a GlobalState,
imgs: &'a Imgs, imgs: &'a Imgs,
@ -207,6 +208,7 @@ impl<'a> Widget for Skillbar<'a> {
} }
} }
#[allow(clippy::unused_unit)] // TODO: Pending review in #587
fn style(&self) -> Self::Style { () } fn style(&self) -> Self::Style { () }
fn update(self, args: widget::UpdateArgs<Self>) -> Self::Event { fn update(self, args: widget::UpdateArgs<Self>) -> Self::Event {

View File

@ -77,6 +77,7 @@ impl<'a> Widget for Social<'a> {
fn init_state(&self, id_gen: widget::id::Generator) -> Self::State { Ids::new(id_gen) } fn init_state(&self, id_gen: widget::id::Generator) -> Self::State { Ids::new(id_gen) }
#[allow(clippy::unused_unit)] // TODO: Pending review in #587
fn style(&self) -> Self::Style { () } fn style(&self) -> Self::Style { () }
fn update(self, args: widget::UpdateArgs<Self>) -> Self::Event { fn update(self, args: widget::UpdateArgs<Self>) -> Self::Event {

View File

@ -67,6 +67,7 @@ impl<'a> Widget for Spell<'a> {
fn init_state(&self, id_gen: widget::id::Generator) -> Self::State { Ids::new(id_gen) } fn init_state(&self, id_gen: widget::id::Generator) -> Self::State { Ids::new(id_gen) }
#[allow(clippy::unused_unit)] // TODO: Pending review in #587
fn style(&self) -> Self::Style { () } fn style(&self) -> Self::Style { () }
fn update(self, args: widget::UpdateArgs<Self>) -> Self::Event { fn update(self, args: widget::UpdateArgs<Self>) -> Self::Event {

View File

@ -145,6 +145,7 @@ impl Asset for VoxygenLocalization {
/// Load the translations located in the input buffer and convert them /// Load the translations located in the input buffer and convert them
/// into a `VoxygenLocalization` object. /// into a `VoxygenLocalization` object.
#[allow(clippy::into_iter_on_ref)] // TODO: Pending review in #587
fn parse(buf_reader: BufReader<File>) -> Result<Self, assets::Error> { fn parse(buf_reader: BufReader<File>) -> Result<Self, assets::Error> {
let mut asked_localization: VoxygenLocalization = let mut asked_localization: VoxygenLocalization =
from_reader(buf_reader).map_err(assets::Error::parse_error)?; from_reader(buf_reader).map_err(assets::Error::parse_error)?;

View File

@ -17,6 +17,7 @@ pub struct KeyState {
} }
impl KeyState { impl KeyState {
#[allow(clippy::new_without_default)] // TODO: Pending review in #587
pub fn new() -> KeyState { pub fn new() -> KeyState {
KeyState { KeyState {
right: false, right: false,

Some files were not shown because too many files have changed in this diff Show More