From 33ebb0a4a321fe231d93397b8ef7430dc02f5737 Mon Sep 17 00:00:00 2001 From: Joshua Barretto Date: Sat, 1 Apr 2023 22:55:45 +0100 Subject: [PATCH] Make clippy happy --- server/src/cmd.rs | 2 +- voxygen/src/menu/char_selection/ui/mod.rs | 16 ++++++---------- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/server/src/cmd.rs b/server/src/cmd.rs index b9a2ca6917..9bbc73a86d 100644 --- a/server/src/cmd.rs +++ b/server/src/cmd.rs @@ -885,7 +885,7 @@ fn handle_respawn( .state .read_storage::() .get(target) - .ok_or_else(|| "No waypoint set")? + .ok_or("No waypoint set")? .get_pos(); position_mut(server, target, "target", |current_pos| { diff --git a/voxygen/src/menu/char_selection/ui/mod.rs b/voxygen/src/menu/char_selection/ui/mod.rs index 59e07dbc0c..86ec858509 100644 --- a/voxygen/src/menu/char_selection/ui/mod.rs +++ b/voxygen/src/menu/char_selection/ui/mod.rs @@ -1332,13 +1332,12 @@ impl Controls { let map_img = Image::new(self.map_img) .height(Length::Units(map_sz.x)) .width(Length::Units(map_sz.y)); - let site_name = Text::new(format!( - "{}", + let site_name = Text::new( self.possible_starting_sites[*start_site_idx] .name .as_deref() - .unwrap_or("Unknown") - )) + .unwrap_or("Unknown"), + ) .horizontal_alignment(HorizontalAlignment::Left); let map = if let Some(info) = self.possible_starting_sites.get(*start_site_idx) @@ -1357,8 +1356,7 @@ impl Controls { .spacing(2) .push(site_name) .push(marker_img) - .align_items(Align::Center) - .into(); + .align_items(Align::Center); Overlay::new( Container::new(marker_content) @@ -1385,8 +1383,7 @@ impl Controls { FILL_FRAC_ONE, button_style, Some(Message::PrevStartingSite), - ) - .into(), + ), neat_button( next_starting_site_button, i18n.get_msg("char_selection-starting_site_next") @@ -1394,8 +1391,7 @@ impl Controls { FILL_FRAC_ONE, button_style, Some(Message::NextStartingSite), - ) - .into(), + ), ]) .max_height(60) .padding(15)