From 70d0840e964045791a79eea0b7d9554bada72caf Mon Sep 17 00:00:00 2001 From: "Dr. Dystopia" Date: Sat, 24 Jul 2021 20:14:26 +0200 Subject: [PATCH] Resolve unused '#[allow(clippy::unnecessary_wraps)]' error supressions --- client/src/lib.rs | 3 --- plugin/derive/src/lib.rs | 2 -- server-cli/src/main.rs | 1 - server/src/events/inventory_manip.rs | 1 - server/src/sys/msg/general.rs | 1 - voxygen/src/scene/figure/mod.rs | 1 - 6 files changed, 9 deletions(-) diff --git a/client/src/lib.rs b/client/src/lib.rs index 0bad1e770a..935aeec197 100644 --- a/client/src/lib.rs +++ b/client/src/lib.rs @@ -1833,7 +1833,6 @@ impl Client { Ok(()) } - #[allow(clippy::unnecessary_wraps)] fn handle_server_in_game_msg( &mut self, frontend_events: &mut Vec, @@ -2012,7 +2011,6 @@ impl Client { Ok(()) } - #[allow(clippy::unnecessary_wraps)] fn handle_server_terrain_msg(&mut self, msg: ServerGeneral) -> Result<(), Error> { prof_span!("handle_server_terrain_mgs"); match msg { @@ -2034,7 +2032,6 @@ impl Client { Ok(()) } - #[allow(clippy::unnecessary_wraps)] fn handle_server_character_screen_msg( &mut self, events: &mut Vec, diff --git a/plugin/derive/src/lib.rs b/plugin/derive/src/lib.rs index 3a7ce33f8b..3ac534d03a 100644 --- a/plugin/derive/src/lib.rs +++ b/plugin/derive/src/lib.rs @@ -30,7 +30,6 @@ pub fn event_handler(_args: TokenStream, item: TokenStream) -> TokenStream { let out: proc_macro2::TokenStream = if fn_args.len() == 1 { quote! { - #[allow(clippy::unnecessary_wraps)] #[no_mangle] pub fn #fn_name(intern__ptr: i64, intern__len: i64) -> i64 { let input = ::veloren_plugin_rt::read_input(intern__ptr as _,intern__len as _).unwrap(); @@ -47,7 +46,6 @@ pub fn event_handler(_args: TokenStream, item: TokenStream) -> TokenStream { } } else { quote! { - #[allow(clippy::unnecessary_wraps)] #[no_mangle] pub fn #fn_name(intern__ptr: i64, intern__len: i64) -> i64 { let input = ::veloren_plugin_rt::read_input(intern__ptr as _,intern__len as _).unwrap(); diff --git a/server-cli/src/main.rs b/server-cli/src/main.rs index 2e6d78ea96..ba424df514 100644 --- a/server-cli/src/main.rs +++ b/server-cli/src/main.rs @@ -32,7 +32,6 @@ lazy_static::lazy_static! { } const TPS: u64 = 30; -#[allow(clippy::unnecessary_wraps)] fn main() -> io::Result<()> { let app = ArgvApp::from_args(); diff --git a/server/src/events/inventory_manip.rs b/server/src/events/inventory_manip.rs index 2bf34df41a..35176fa4cb 100644 --- a/server/src/events/inventory_manip.rs +++ b/server/src/events/inventory_manip.rs @@ -771,7 +771,6 @@ mod tests { use super::*; // Helper function - #[allow(clippy::unnecessary_wraps)] fn test_cylinder(pos: comp::Pos) -> Option { Some(Cylinder::from_components(pos.0, None, None, None)) } diff --git a/server/src/sys/msg/general.rs b/server/src/sys/msg/general.rs index e3787cc0ca..fa9a486bfa 100644 --- a/server/src/sys/msg/general.rs +++ b/server/src/sys/msg/general.rs @@ -14,7 +14,6 @@ use tracing::{debug, error, warn}; impl Sys { #[allow(clippy::too_many_arguments)] - #[allow(clippy::unnecessary_wraps)] fn handle_general_msg( server_emitter: &mut common::event::Emitter<'_, ServerEvent>, entity: specs::Entity, diff --git a/voxygen/src/scene/figure/mod.rs b/voxygen/src/scene/figure/mod.rs index 593a74e29d..3461ed824c 100644 --- a/voxygen/src/scene/figure/mod.rs +++ b/voxygen/src/scene/figure/mod.rs @@ -5221,7 +5221,6 @@ impl FigureColLights { } } - #[allow(clippy::unnecessary_wraps)] fn make_atlas(renderer: &mut Renderer) -> Result { let max_texture_size = renderer.max_texture_size(); let atlas_size = guillotiere::Size::new(max_texture_size as i32, max_texture_size as i32);