Fix clippy::needless_borrow

This commit is contained in:
ice_iix 2021-07-31 19:05:03 -07:00
parent eb420c4896
commit 3d1bea85fe
3 changed files with 5 additions and 6 deletions

View File

@ -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) => {
@ -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,

View File

@ -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);

View File

@ -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);