Fix clippy::needless_borrow
This commit is contained in:
parent
eb420c4896
commit
3d1bea85fe
|
@ -92,7 +92,7 @@ pub struct Game {
|
||||||
impl Game {
|
impl Game {
|
||||||
pub fn connect_to(&mut self, address: &str) {
|
pub fn connect_to(&mut self, address: &str) {
|
||||||
let (protocol_version, forge_mods, fml_network_version) =
|
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())
|
.and_then(|conn| conn.do_status())
|
||||||
{
|
{
|
||||||
Ok(res) => {
|
Ok(res) => {
|
||||||
|
@ -509,14 +509,14 @@ fn main2() {
|
||||||
glutin_window.resize(physical_size);
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(target_arch = "wasm32"))]
|
#[cfg(not(target_arch = "wasm32"))]
|
||||||
{
|
{
|
||||||
tick_all(
|
tick_all(
|
||||||
&winit_window,
|
winit_window,
|
||||||
&mut game,
|
&mut game,
|
||||||
&mut ui_container,
|
&mut ui_container,
|
||||||
&mut last_frame,
|
&mut last_frame,
|
||||||
|
|
|
@ -518,7 +518,7 @@ impl super::Screen for ServerList {
|
||||||
} else {
|
} else {
|
||||||
&res.protocol_name
|
&res.protocol_name
|
||||||
};
|
};
|
||||||
let mut txt = TextComponent::new(&st);
|
let mut txt = TextComponent::new(st);
|
||||||
txt.modifier.color = Some(format::Color::Yellow);
|
txt.modifier.color = Some(format::Color::Yellow);
|
||||||
let mut msg = Component::Text(txt);
|
let mut msg = Component::Text(txt);
|
||||||
format::convert_legacy(&mut msg);
|
format::convert_legacy(&mut msg);
|
||||||
|
|
|
@ -1823,8 +1823,7 @@ impl Server {
|
||||||
continue;
|
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,
|
Ok(val) => val,
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
error!("Failed to parse skin blob, {:?}", err);
|
error!("Failed to parse skin blob, {:?}", err);
|
||||||
|
|
Loading…
Reference in New Issue