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
e9be36c993
commit
2290efd219
@ -128,7 +128,7 @@ impl Sys {
|
||||
/// This system will handle new messages from clients
|
||||
pub struct Sys;
|
||||
impl<'a> System<'a> for Sys {
|
||||
#[allow(clippy::type_complexity)] // TODO: Pending review in #587
|
||||
#[allow(clippy::type_complexity)]
|
||||
type SystemData = (
|
||||
Entities<'a>,
|
||||
Read<'a, EventBus<ServerEvent>>,
|
||||
@ -144,9 +144,6 @@ impl<'a> System<'a> for Sys {
|
||||
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(
|
||||
&mut self,
|
||||
(
|
||||
@ -196,19 +193,16 @@ impl<'a> System<'a> for Sys {
|
||||
)
|
||||
});
|
||||
|
||||
match res {
|
||||
Ok(1_u64..=u64::MAX) => {
|
||||
// Update client ping.
|
||||
client.last_ping = time.0
|
||||
},
|
||||
_ => (/*handled by ping*/),
|
||||
if let Ok(1_u64..=u64::MAX) = res {
|
||||
// Update client ping.
|
||||
client.last_ping = time.0
|
||||
}
|
||||
}
|
||||
|
||||
// Handle new chat messages.
|
||||
for (entity, msg) in new_chat_msgs {
|
||||
// Handle chat commands.
|
||||
if msg.message.starts_with("/") {
|
||||
if msg.message.starts_with('/') {
|
||||
if let (Some(entity), true) = (entity, msg.message.len() > 1) {
|
||||
let argv = String::from(&msg.message[1..]);
|
||||
server_emitter.emit(ServerEvent::ChatCmd(entity, argv));
|
||||
|
@ -72,7 +72,7 @@ impl Sys {
|
||||
/// This system will handle new messages from clients
|
||||
pub struct Sys;
|
||||
impl<'a> System<'a> for Sys {
|
||||
#[allow(clippy::type_complexity)] // TODO: Pending review in #587
|
||||
#[allow(clippy::type_complexity)]
|
||||
type SystemData = (
|
||||
Entities<'a>,
|
||||
Read<'a, EventBus<ServerEvent>>,
|
||||
@ -85,9 +85,6 @@ impl<'a> System<'a> for Sys {
|
||||
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(
|
||||
&mut self,
|
||||
(
|
||||
@ -125,19 +122,16 @@ impl<'a> System<'a> for Sys {
|
||||
)
|
||||
});
|
||||
|
||||
match res {
|
||||
Ok(1_u64..=u64::MAX) => {
|
||||
// Update client ping.
|
||||
client.last_ping = time.0
|
||||
},
|
||||
_ => (/*handled by ping*/),
|
||||
if let Ok(1_u64..=u64::MAX) = res {
|
||||
// Update client ping.
|
||||
client.last_ping = time.0
|
||||
}
|
||||
}
|
||||
|
||||
// Handle new chat messages.
|
||||
for (entity, msg) in new_chat_msgs {
|
||||
// Handle chat commands.
|
||||
if msg.message.starts_with("/") {
|
||||
if msg.message.starts_with('/') {
|
||||
if let (Some(entity), true) = (entity, msg.message.len() > 1) {
|
||||
let argv = String::from(&msg.message[1..]);
|
||||
server_emitter.emit(ServerEvent::ChatCmd(entity, argv));
|
||||
|
@ -177,7 +177,7 @@ impl Sys {
|
||||
/// This system will handle new messages from clients
|
||||
pub struct Sys;
|
||||
impl<'a> System<'a> for Sys {
|
||||
#[allow(clippy::type_complexity)] // TODO: Pending review in #587
|
||||
#[allow(clippy::type_complexity)]
|
||||
type SystemData = (
|
||||
Entities<'a>,
|
||||
Read<'a, EventBus<ServerEvent>>,
|
||||
@ -199,9 +199,6 @@ impl<'a> System<'a> for Sys {
|
||||
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(
|
||||
&mut self,
|
||||
(
|
||||
@ -255,12 +252,9 @@ impl<'a> System<'a> for Sys {
|
||||
)
|
||||
});
|
||||
|
||||
match res {
|
||||
Ok(1_u64..=u64::MAX) => {
|
||||
// Update client ping.
|
||||
client.last_ping = time.0
|
||||
},
|
||||
_ => (/*handled by ping*/),
|
||||
if let Ok(1_u64..=u64::MAX) = res {
|
||||
// Update client ping.
|
||||
client.last_ping = time.0
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -30,7 +30,7 @@ impl Sys {
|
||||
/// This system will handle new messages from clients
|
||||
pub struct Sys;
|
||||
impl<'a> System<'a> for Sys {
|
||||
#[allow(clippy::type_complexity)] // TODO: Pending review in #587
|
||||
#[allow(clippy::type_complexity)]
|
||||
type SystemData = (
|
||||
Entities<'a>,
|
||||
Read<'a, EventBus<ServerEvent>>,
|
||||
@ -42,9 +42,6 @@ impl<'a> System<'a> for Sys {
|
||||
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(
|
||||
&mut self,
|
||||
(
|
||||
|
@ -90,7 +90,7 @@ impl Sys {
|
||||
/// This system will handle new messages from clients
|
||||
pub struct Sys;
|
||||
impl<'a> System<'a> for Sys {
|
||||
#[allow(clippy::type_complexity)] // TODO: Pending review in #587
|
||||
#[allow(clippy::type_complexity)]
|
||||
type SystemData = (
|
||||
Entities<'a>,
|
||||
Read<'a, Time>,
|
||||
@ -107,9 +107,6 @@ impl<'a> System<'a> for Sys {
|
||||
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(
|
||||
&mut self,
|
||||
(
|
||||
@ -174,12 +171,9 @@ impl<'a> System<'a> for Sys {
|
||||
)
|
||||
});
|
||||
|
||||
match res {
|
||||
Ok(1_u64..=u64::MAX) => {
|
||||
// Update client ping.
|
||||
client.last_ping = time.0
|
||||
},
|
||||
_ => (/*handled by ping*/),
|
||||
if let Ok(1_u64..=u64::MAX) = res {
|
||||
// Update client ping.
|
||||
client.last_ping = time.0
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user