mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
remove clippy warnings no longer needed
This commit is contained in:
parent
bfe623fe8d
commit
cc6f094e8a
@ -128,7 +128,7 @@ impl Sys {
|
|||||||
/// This system will handle new messages from clients
|
/// This system will handle new messages from clients
|
||||||
pub struct Sys;
|
pub struct Sys;
|
||||||
impl<'a> System<'a> for Sys {
|
impl<'a> System<'a> for Sys {
|
||||||
#[allow(clippy::type_complexity)] // TODO: Pending review in #587
|
#[allow(clippy::type_complexity)]
|
||||||
type SystemData = (
|
type SystemData = (
|
||||||
Entities<'a>,
|
Entities<'a>,
|
||||||
Read<'a, EventBus<ServerEvent>>,
|
Read<'a, EventBus<ServerEvent>>,
|
||||||
@ -144,9 +144,6 @@ impl<'a> System<'a> for Sys {
|
|||||||
ReadExpect<'a, AliasValidator>,
|
ReadExpect<'a, AliasValidator>,
|
||||||
);
|
);
|
||||||
|
|
||||||
#[allow(clippy::match_ref_pats)] // TODO: Pending review in #587
|
|
||||||
#[allow(clippy::single_char_pattern)] // TODO: Pending review in #587
|
|
||||||
#[allow(clippy::single_match)] // TODO: Pending review in #587
|
|
||||||
fn run(
|
fn run(
|
||||||
&mut self,
|
&mut self,
|
||||||
(
|
(
|
||||||
@ -196,19 +193,16 @@ impl<'a> System<'a> for Sys {
|
|||||||
)
|
)
|
||||||
});
|
});
|
||||||
|
|
||||||
match res {
|
if let Ok(1_u64..=u64::MAX) = res {
|
||||||
Ok(1_u64..=u64::MAX) => {
|
// Update client ping.
|
||||||
// Update client ping.
|
client.last_ping = time.0
|
||||||
client.last_ping = time.0
|
|
||||||
},
|
|
||||||
_ => (/*handled by ping*/),
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handle new chat messages.
|
// Handle new chat messages.
|
||||||
for (entity, msg) in new_chat_msgs {
|
for (entity, msg) in new_chat_msgs {
|
||||||
// Handle chat commands.
|
// Handle chat commands.
|
||||||
if msg.message.starts_with("/") {
|
if msg.message.starts_with('/') {
|
||||||
if let (Some(entity), true) = (entity, msg.message.len() > 1) {
|
if let (Some(entity), true) = (entity, msg.message.len() > 1) {
|
||||||
let argv = String::from(&msg.message[1..]);
|
let argv = String::from(&msg.message[1..]);
|
||||||
server_emitter.emit(ServerEvent::ChatCmd(entity, argv));
|
server_emitter.emit(ServerEvent::ChatCmd(entity, argv));
|
||||||
|
@ -72,7 +72,7 @@ impl Sys {
|
|||||||
/// This system will handle new messages from clients
|
/// This system will handle new messages from clients
|
||||||
pub struct Sys;
|
pub struct Sys;
|
||||||
impl<'a> System<'a> for Sys {
|
impl<'a> System<'a> for Sys {
|
||||||
#[allow(clippy::type_complexity)] // TODO: Pending review in #587
|
#[allow(clippy::type_complexity)]
|
||||||
type SystemData = (
|
type SystemData = (
|
||||||
Entities<'a>,
|
Entities<'a>,
|
||||||
Read<'a, EventBus<ServerEvent>>,
|
Read<'a, EventBus<ServerEvent>>,
|
||||||
@ -85,9 +85,6 @@ impl<'a> System<'a> for Sys {
|
|||||||
WriteStorage<'a, GeneralStream>,
|
WriteStorage<'a, GeneralStream>,
|
||||||
);
|
);
|
||||||
|
|
||||||
#[allow(clippy::match_ref_pats)] // TODO: Pending review in #587
|
|
||||||
#[allow(clippy::single_char_pattern)] // TODO: Pending review in #587
|
|
||||||
#[allow(clippy::single_match)] // TODO: Pending review in #587
|
|
||||||
fn run(
|
fn run(
|
||||||
&mut self,
|
&mut self,
|
||||||
(
|
(
|
||||||
@ -125,19 +122,16 @@ impl<'a> System<'a> for Sys {
|
|||||||
)
|
)
|
||||||
});
|
});
|
||||||
|
|
||||||
match res {
|
if let Ok(1_u64..=u64::MAX) = res {
|
||||||
Ok(1_u64..=u64::MAX) => {
|
// Update client ping.
|
||||||
// Update client ping.
|
client.last_ping = time.0
|
||||||
client.last_ping = time.0
|
|
||||||
},
|
|
||||||
_ => (/*handled by ping*/),
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handle new chat messages.
|
// Handle new chat messages.
|
||||||
for (entity, msg) in new_chat_msgs {
|
for (entity, msg) in new_chat_msgs {
|
||||||
// Handle chat commands.
|
// Handle chat commands.
|
||||||
if msg.message.starts_with("/") {
|
if msg.message.starts_with('/') {
|
||||||
if let (Some(entity), true) = (entity, msg.message.len() > 1) {
|
if let (Some(entity), true) = (entity, msg.message.len() > 1) {
|
||||||
let argv = String::from(&msg.message[1..]);
|
let argv = String::from(&msg.message[1..]);
|
||||||
server_emitter.emit(ServerEvent::ChatCmd(entity, argv));
|
server_emitter.emit(ServerEvent::ChatCmd(entity, argv));
|
||||||
|
@ -177,7 +177,7 @@ impl Sys {
|
|||||||
/// This system will handle new messages from clients
|
/// This system will handle new messages from clients
|
||||||
pub struct Sys;
|
pub struct Sys;
|
||||||
impl<'a> System<'a> for Sys {
|
impl<'a> System<'a> for Sys {
|
||||||
#[allow(clippy::type_complexity)] // TODO: Pending review in #587
|
#[allow(clippy::type_complexity)]
|
||||||
type SystemData = (
|
type SystemData = (
|
||||||
Entities<'a>,
|
Entities<'a>,
|
||||||
Read<'a, EventBus<ServerEvent>>,
|
Read<'a, EventBus<ServerEvent>>,
|
||||||
@ -199,9 +199,6 @@ impl<'a> System<'a> for Sys {
|
|||||||
Read<'a, Settings>,
|
Read<'a, Settings>,
|
||||||
);
|
);
|
||||||
|
|
||||||
#[allow(clippy::match_ref_pats)] // TODO: Pending review in #587
|
|
||||||
#[allow(clippy::single_char_pattern)] // TODO: Pending review in #587
|
|
||||||
#[allow(clippy::single_match)] // TODO: Pending review in #587
|
|
||||||
fn run(
|
fn run(
|
||||||
&mut self,
|
&mut self,
|
||||||
(
|
(
|
||||||
@ -255,12 +252,9 @@ impl<'a> System<'a> for Sys {
|
|||||||
)
|
)
|
||||||
});
|
});
|
||||||
|
|
||||||
match res {
|
if let Ok(1_u64..=u64::MAX) = res {
|
||||||
Ok(1_u64..=u64::MAX) => {
|
// Update client ping.
|
||||||
// Update client ping.
|
client.last_ping = time.0
|
||||||
client.last_ping = time.0
|
|
||||||
},
|
|
||||||
_ => (/*handled by ping*/),
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ impl Sys {
|
|||||||
/// This system will handle new messages from clients
|
/// This system will handle new messages from clients
|
||||||
pub struct Sys;
|
pub struct Sys;
|
||||||
impl<'a> System<'a> for Sys {
|
impl<'a> System<'a> for Sys {
|
||||||
#[allow(clippy::type_complexity)] // TODO: Pending review in #587
|
#[allow(clippy::type_complexity)]
|
||||||
type SystemData = (
|
type SystemData = (
|
||||||
Entities<'a>,
|
Entities<'a>,
|
||||||
Read<'a, EventBus<ServerEvent>>,
|
Read<'a, EventBus<ServerEvent>>,
|
||||||
@ -42,9 +42,6 @@ impl<'a> System<'a> for Sys {
|
|||||||
Read<'a, Settings>,
|
Read<'a, Settings>,
|
||||||
);
|
);
|
||||||
|
|
||||||
#[allow(clippy::match_ref_pats)] // TODO: Pending review in #587
|
|
||||||
#[allow(clippy::single_char_pattern)] // TODO: Pending review in #587
|
|
||||||
#[allow(clippy::single_match)] // TODO: Pending review in #587
|
|
||||||
fn run(
|
fn run(
|
||||||
&mut self,
|
&mut self,
|
||||||
(
|
(
|
||||||
|
@ -90,7 +90,7 @@ impl Sys {
|
|||||||
/// This system will handle new messages from clients
|
/// This system will handle new messages from clients
|
||||||
pub struct Sys;
|
pub struct Sys;
|
||||||
impl<'a> System<'a> for Sys {
|
impl<'a> System<'a> for Sys {
|
||||||
#[allow(clippy::type_complexity)] // TODO: Pending review in #587
|
#[allow(clippy::type_complexity)]
|
||||||
type SystemData = (
|
type SystemData = (
|
||||||
Entities<'a>,
|
Entities<'a>,
|
||||||
Read<'a, Time>,
|
Read<'a, Time>,
|
||||||
@ -107,9 +107,6 @@ impl<'a> System<'a> for Sys {
|
|||||||
ReadExpect<'a, EditableSettings>,
|
ReadExpect<'a, EditableSettings>,
|
||||||
);
|
);
|
||||||
|
|
||||||
#[allow(clippy::match_ref_pats)] // TODO: Pending review in #587
|
|
||||||
#[allow(clippy::single_char_pattern)] // TODO: Pending review in #587
|
|
||||||
#[allow(clippy::single_match)] // TODO: Pending review in #587
|
|
||||||
fn run(
|
fn run(
|
||||||
&mut self,
|
&mut self,
|
||||||
(
|
(
|
||||||
@ -174,12 +171,9 @@ impl<'a> System<'a> for Sys {
|
|||||||
)
|
)
|
||||||
});
|
});
|
||||||
|
|
||||||
match res {
|
if let Ok(1_u64..=u64::MAX) = res {
|
||||||
Ok(1_u64..=u64::MAX) => {
|
// Update client ping.
|
||||||
// Update client ping.
|
client.last_ping = time.0
|
||||||
client.last_ping = time.0
|
|
||||||
},
|
|
||||||
_ => (/*handled by ping*/),
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user