Skip to content

Commit

Permalink
Fix clippy::needless_borrow
Browse files Browse the repository at this point in the history
  • Loading branch information
iceiix committed Aug 1, 2021
1 parent eb420c4 commit 3d1bea8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ pub struct Game {
impl Game {
pub fn connect_to(&mut self, address: &str) {
let (protocol_version, forge_mods, fml_network_version) =
match protocol::Conn::new(&address, self.default_protocol_version)
match protocol::Conn::new(address, self.default_protocol_version)
.and_then(|conn| conn.do_status())
{
Ok(res) => {
Expand Down Expand Up @@ -509,14 +509,14 @@ fn main2() {
glutin_window.resize(physical_size);
}

if !handle_window_event(&winit_window, &mut game, &mut ui_container, event) {
if !handle_window_event(winit_window, &mut game, &mut ui_container, event) {
return;
}

#[cfg(not(target_arch = "wasm32"))]
{
tick_all(
&winit_window,
winit_window,
&mut game,
&mut ui_container,
&mut last_frame,
Expand Down
2 changes: 1 addition & 1 deletion src/screen/server_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ impl super::Screen for ServerList {
} else {
&res.protocol_name
};
let mut txt = TextComponent::new(&st);
let mut txt = TextComponent::new(st);
txt.modifier.color = Some(format::Color::Yellow);
let mut msg = Component::Text(txt);
format::convert_legacy(&mut msg);
Expand Down
3 changes: 1 addition & 2 deletions src/server/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1823,8 +1823,7 @@ impl Server {
continue;
}
};
let skin_blob: serde_json::Value = match serde_json::from_slice(&skin_blob)
{
let skin_blob: serde_json::Value = match serde_json::from_slice(skin_blob) {
Ok(val) => val,
Err(err) => {
error!("Failed to parse skin blob, {:?}", err);
Expand Down

0 comments on commit 3d1bea8

Please sign in to comment.