Skip to content

Commit

Permalink
Fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
garkimasera committed Dec 3, 2021
1 parent 71605e2 commit 8152be2
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#![cfg_attr(not(global_state_obj), allow(dead_code))]
#![cfg_attr(not(global_state_obj), allow(unused_variables))]
#![cfg_attr(not(global_state_obj), allow(unused_imports))]
#![allow(clippy::derivable_impls)]

#[macro_use]
extern crate serde_derive;
Expand Down
8 changes: 4 additions & 4 deletions map-editor/src/iconview.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ impl IconView {
let filter_wall: gtk::TreeModelFilter = get_object!(builder, "filter-wall");
let filter_deco: gtk::TreeModelFilter = get_object!(builder, "filter-deco");
let filter_item: gtk::TreeModelFilter = get_object!(builder, "filter-item");
filter_tile.set_visible_func(|m, i| item_filter(m, i));
filter_wall.set_visible_func(|m, i| item_filter(m, i));
filter_deco.set_visible_func(|m, i| item_filter(m, i));
filter_item.set_visible_func(|m, i| item_filter(m, i));
filter_tile.set_visible_func(item_filter);
filter_wall.set_visible_func(item_filter);
filter_deco.set_visible_func(item_filter);
filter_item.set_visible_func(item_filter);

IconView {
iconview_tile: get_object!(builder, "iconview-tile"),
Expand Down
2 changes: 1 addition & 1 deletion rng/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
//! Helper crate for using thread local and fast random number generator
#![warn(
rust_2018_compatibility,
rust_2018_idioms,
future_incompatible,
nonstandard_style
)]
#![allow(clippy::redundant_closure)]

use rand::distributions::uniform::{SampleRange, SampleUniform};
pub use rand::seq::SliceRandom;
Expand Down
2 changes: 1 addition & 1 deletion rusted-ruins/src/game/playeract/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ impl<'a, 's> DoPlayerAction<'a, 's> {
pub fn shoot(&mut self, target: Vec2d) {
let map = self.gd().get_current_map();
if let Some(target_id) = map.get_chara(target) {
if super::action::shoot_target(&mut self.0, CharaId::Player, target_id) {
if super::action::shoot_target(self.0, CharaId::Player, target_id) {
self.0.finish_player_turn();
}
}
Expand Down

0 comments on commit 8152be2

Please sign in to comment.