listen to supreme leader clippy in some places and silence him like the puppet he is in others
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
1d9787402c
commit
5ba61cf461
@ -12,7 +12,5 @@ fn main() {
|
|||||||
elseware::common::mainloop::run_server(patch_state, patch_config.port).await;
|
elseware::common::mainloop::run_server(patch_state, patch_config.port).await;
|
||||||
});
|
});
|
||||||
|
|
||||||
async_std::task::block_on(async move {
|
async_std::task::block_on(patch_loop);
|
||||||
patch_loop.await
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
@ -220,12 +220,8 @@ where
|
|||||||
let mut buf = [0u8; 1];
|
let mut buf = [0u8; 1];
|
||||||
loop {
|
loop {
|
||||||
let peek = socket.peek(&mut buf).await;
|
let peek = socket.peek(&mut buf).await;
|
||||||
match peek {
|
if let Ok(0) = peek {
|
||||||
Ok(len) if len == 0 => {
|
break
|
||||||
break
|
|
||||||
},
|
|
||||||
_ => {
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -323,6 +323,7 @@ impl std::cmp::PartialEq for BankItemDetail {
|
|||||||
|
|
||||||
impl std::cmp::Eq for BankItemDetail {}
|
impl std::cmp::Eq for BankItemDetail {}
|
||||||
|
|
||||||
|
#[allow(clippy::non_canonical_partial_ord_impl)]
|
||||||
impl std::cmp::PartialOrd for BankItemDetail {
|
impl std::cmp::PartialOrd for BankItemDetail {
|
||||||
fn partial_cmp(&self, other: &BankItemDetail) -> Option<std::cmp::Ordering> {
|
fn partial_cmp(&self, other: &BankItemDetail) -> Option<std::cmp::Ordering> {
|
||||||
let mut self_bytes = [0u8; 4];
|
let mut self_bytes = [0u8; 4];
|
||||||
@ -360,6 +361,7 @@ impl std::cmp::PartialEq for BankItem {
|
|||||||
|
|
||||||
impl std::cmp::Eq for BankItem {}
|
impl std::cmp::Eq for BankItem {}
|
||||||
|
|
||||||
|
#[allow(clippy::non_canonical_partial_ord_impl)]
|
||||||
impl std::cmp::PartialOrd for BankItem {
|
impl std::cmp::PartialOrd for BankItem {
|
||||||
fn partial_cmp(&self, other: &BankItem) -> Option<std::cmp::Ordering> {
|
fn partial_cmp(&self, other: &BankItem) -> Option<std::cmp::Ordering> {
|
||||||
self.item.partial_cmp(&other.item)
|
self.item.partial_cmp(&other.item)
|
||||||
|
@ -9,6 +9,7 @@ use std::convert::TryInto;
|
|||||||
|
|
||||||
use futures::stream::StreamExt;
|
use futures::stream::StreamExt;
|
||||||
|
|
||||||
|
#[allow(clippy::manual_try_fold)]
|
||||||
pub async fn join_room(id: ClientId,
|
pub async fn join_room(id: ClientId,
|
||||||
clients: &Clients,
|
clients: &Clients,
|
||||||
client_location: &ClientLocation,
|
client_location: &ClientLocation,
|
||||||
|
@ -342,8 +342,8 @@ impl<R: Rng + SeedableRng> ArmorShop<R> {
|
|||||||
|
|
||||||
pub fn generate_armor_list(&mut self, character_level: usize) -> Vec<ArmorShopItem> {
|
pub fn generate_armor_list(&mut self, character_level: usize) -> Vec<ArmorShopItem> {
|
||||||
self.generate_frame_list(character_level).into_iter()
|
self.generate_frame_list(character_level).into_iter()
|
||||||
.chain(self.generate_barrier_list(character_level).into_iter())
|
.chain(self.generate_barrier_list(character_level))
|
||||||
.chain(self.generate_unit_list(character_level).into_iter())
|
.chain(self.generate_unit_list(character_level))
|
||||||
.collect()
|
.collect()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -36,16 +36,7 @@ impl Ord for ToolShopItem {
|
|||||||
|
|
||||||
impl PartialOrd for ToolShopItem {
|
impl PartialOrd for ToolShopItem {
|
||||||
fn partial_cmp(&self, other: &ToolShopItem) -> Option<std::cmp::Ordering> {
|
fn partial_cmp(&self, other: &ToolShopItem) -> Option<std::cmp::Ordering> {
|
||||||
let a = match self {
|
Some(self.cmp(other))
|
||||||
ToolShopItem::Tool(t) => Tool{tool : *t}.as_individual_bytes(),
|
|
||||||
ToolShopItem::Tech(t) => t.as_bytes(),
|
|
||||||
};
|
|
||||||
let b = match other {
|
|
||||||
ToolShopItem::Tool(t) => Tool{tool : *t}.as_individual_bytes(),
|
|
||||||
ToolShopItem::Tech(t) => t.as_bytes(),
|
|
||||||
};
|
|
||||||
|
|
||||||
a.partial_cmp(&b)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -285,7 +276,7 @@ impl<R: Rng + SeedableRng> ToolShop<R> {
|
|||||||
pub fn generate_tool_list(&mut self, character_level: usize) -> Vec<ToolShopItem> {
|
pub fn generate_tool_list(&mut self, character_level: usize) -> Vec<ToolShopItem> {
|
||||||
let mut tools = Vec::new().into_iter()
|
let mut tools = Vec::new().into_iter()
|
||||||
.chain(self.tools.0.clone().into_iter().map(ToolShopItem::Tool))
|
.chain(self.tools.0.clone().into_iter().map(ToolShopItem::Tool))
|
||||||
.chain(self.generate_techs(character_level).into_iter())
|
.chain(self.generate_techs(character_level))
|
||||||
.collect::<Vec<_>>();
|
.collect::<Vec<_>>();
|
||||||
tools.sort();
|
tools.sort();
|
||||||
tools
|
tools
|
||||||
|
Loading…
x
Reference in New Issue
Block a user