Merge branch 'tygyh/Resolve-all-'#allow(clippy--unused_unit)]'-error-supressions' into 'master'

Resolve all '#[allow(clippy::unused_unit)]' error supressions

See merge request veloren/veloren!2600
This commit is contained in:
Marcel 2021-07-15 07:40:52 +00:00
commit cc202fe2cb
29 changed files with 28 additions and 57 deletions

View File

@ -566,8 +566,7 @@ 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 {

View File

@ -120,8 +120,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 {
common_base::prof_span!("Buttons::update");

View File

@ -200,8 +200,7 @@ 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::redundant_clone)] // TODO: Pending review in #587
#[allow(clippy::single_match)] // TODO: Pending review in #587

View File

@ -230,8 +230,7 @@ impl<'a> Widget for Crafting<'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 {
common_base::prof_span!("Crafting::update");

View File

@ -256,8 +256,7 @@ impl<'a> Widget for Diary<'a> {
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(mut self, args: widget::UpdateArgs<Self>) -> Self::Event {
common_base::prof_span!("Diary::update");

View File

@ -63,8 +63,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 {
common_base::prof_span!("EscMenu::update");

View File

@ -145,7 +145,6 @@ impl<'a> Widget for Group<'a> {
//TODO: Disband groups when there's only one member in them
//TODO: Always send health, energy, level and position of group members to the
// client
#[allow(clippy::unused_unit)] // TODO: Pending review in #587
#[allow(clippy::blocks_in_if_conditions)] // TODO: Pending review in #587
fn update(self, args: widget::UpdateArgs<Self>) -> Self::Event {
common_base::prof_span!("Group::update");

View File

@ -126,8 +126,7 @@ impl<'a> Widget for LootScroller<'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 {
let widget::UpdateArgs { state, ui, .. } = args;

View File

@ -192,8 +192,7 @@ 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 {

View File

@ -433,8 +433,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 {
common_base::prof_span!("Minimap::update");

View File

@ -80,8 +80,7 @@ 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 {

View File

@ -79,8 +79,7 @@ impl<'a> Widget for PromptDialog<'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 {
common_base::prof_span!("PromptDialog::update");

View File

@ -118,8 +118,7 @@ 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 {}
fn update(self, args: widget::UpdateArgs<Self>) -> Self::Event {
common_base::prof_span!("Chat::update");

View File

@ -68,8 +68,7 @@ impl<'a> Widget for Controls<'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 {
common_base::prof_span!("Controls::update");

View File

@ -94,8 +94,7 @@ impl<'a> Widget for Gameplay<'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 {
common_base::prof_span!("Gameplay::update");

View File

@ -135,8 +135,7 @@ impl<'a> Widget for Interface<'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 {
common_base::prof_span!("Interface::update");

View File

@ -63,8 +63,7 @@ impl<'a> Widget for Language<'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 {
common_base::prof_span!("Language::update");

View File

@ -144,8 +144,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 {
common_base::prof_span!("SettingsWindow::update");

View File

@ -76,8 +76,7 @@ impl<'a> Widget for Sound<'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 {
common_base::prof_span!("Sound::update");

View File

@ -173,8 +173,7 @@ impl<'a> Widget for Video<'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 {
common_base::prof_span!("Video::update");

View File

@ -222,8 +222,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 {
common_base::prof_span!("Skillbar::update");

View File

@ -105,8 +105,7 @@ impl<'a> Widget for Social<'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 {
common_base::prof_span!("Social::update");

View File

@ -133,8 +133,7 @@ impl Widget for ImageFrame {
}
}
#[allow(clippy::unused_unit)] // TODO: Pending review in #587
fn style(&self) -> Self::Style { () }
fn style(&self) -> Self::Style {}
/// Update the state of the ImageFrame
fn update(self, args: widget::UpdateArgs<Self>) -> Self::Event {

View File

@ -175,8 +175,7 @@ where
}
}
#[allow(clippy::unused_unit)] // TODO: Pending review in #587
fn style(&self) -> Self::Style { () }
fn style(&self) -> Self::Style {}
/// Update the state of the Slider.
fn update(self, args: widget::UpdateArgs<Self>) -> Self::Event {

View File

@ -87,8 +87,7 @@ impl<W: Ingameable> Widget for Ingame<W> {
}
}
#[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 {
let widget::UpdateArgs { state, ui, .. } = args;

View File

@ -66,8 +66,7 @@ impl<'a> Widget for OutlinedText<'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 {
let widget::UpdateArgs {

View File

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

View File

@ -568,8 +568,7 @@ where
}
}
#[allow(clippy::unused_unit)] // TODO: Pending review in #587
fn style(&self) -> Self::Style { () }
fn style(&self) -> Self::Style {}
/// Update the state of the Slot.
fn update(self, args: widget::UpdateArgs<Self>) -> Self::Event {

View File

@ -87,8 +87,7 @@ impl Widget for ToggleButton {
}
}
#[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 {
let widget::UpdateArgs {