Skip to content

Commit

Permalink
Fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Zerthox committed Jul 20, 2024
1 parent c271403 commit 7f5fe0e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/context/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ impl Context {
} = settings;
self.edit.during_combat = edit_during_combat;
self.edit.show_all = edit_show_all;
self.font = font.and_then(|name| Font::from_name_or_warn(name));
self.font = font.and_then(Font::from_name_or_warn);
self.own_interval.frequency = own_interval;
self.player_interval.frequency = player_interval;
}
Expand Down
5 changes: 1 addition & 4 deletions src/elements/text.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,7 @@ impl Text {
}

pub fn load(&mut self) {
self.loaded_font = self
.font_name
.as_ref()
.and_then(|name| Font::from_name_or_warn(name));
self.loaded_font = self.font_name.as_ref().and_then(Font::from_name_or_warn);
}
}

Expand Down

0 comments on commit 7f5fe0e

Please # to comment.