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;
|
||||
});
|
||||
|
||||
async_std::task::block_on(async move {
|
||||
patch_loop.await
|
||||
});
|
||||
async_std::task::block_on(patch_loop);
|
||||
}
|
||||
|
@ -220,12 +220,8 @@ where
|
||||
let mut buf = [0u8; 1];
|
||||
loop {
|
||||
let peek = socket.peek(&mut buf).await;
|
||||
match peek {
|
||||
Ok(len) if len == 0 => {
|
||||
break
|
||||
},
|
||||
_ => {
|
||||
}
|
||||
if let Ok(0) = peek {
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -323,6 +323,7 @@ impl std::cmp::PartialEq for BankItemDetail {
|
||||
|
||||
impl std::cmp::Eq for BankItemDetail {}
|
||||
|
||||
#[allow(clippy::non_canonical_partial_ord_impl)]
|
||||
impl std::cmp::PartialOrd for BankItemDetail {
|
||||
fn partial_cmp(&self, other: &BankItemDetail) -> Option<std::cmp::Ordering> {
|
||||
let mut self_bytes = [0u8; 4];
|
||||
@ -360,6 +361,7 @@ impl std::cmp::PartialEq for BankItem {
|
||||
|
||||
impl std::cmp::Eq for BankItem {}
|
||||
|
||||
#[allow(clippy::non_canonical_partial_ord_impl)]
|
||||
impl std::cmp::PartialOrd for BankItem {
|
||||
fn partial_cmp(&self, other: &BankItem) -> Option<std::cmp::Ordering> {
|
||||
self.item.partial_cmp(&other.item)
|
||||
|
@ -9,6 +9,7 @@ use std::convert::TryInto;
|
||||
|
||||
use futures::stream::StreamExt;
|
||||
|
||||
#[allow(clippy::manual_try_fold)]
|
||||
pub async fn join_room(id: ClientId,
|
||||
clients: &Clients,
|
||||
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> {
|
||||
self.generate_frame_list(character_level).into_iter()
|
||||
.chain(self.generate_barrier_list(character_level).into_iter())
|
||||
.chain(self.generate_unit_list(character_level).into_iter())
|
||||
.chain(self.generate_barrier_list(character_level))
|
||||
.chain(self.generate_unit_list(character_level))
|
||||
.collect()
|
||||
}
|
||||
}
|
||||
|
@ -36,16 +36,7 @@ impl Ord for ToolShopItem {
|
||||
|
||||
impl PartialOrd for ToolShopItem {
|
||||
fn partial_cmp(&self, other: &ToolShopItem) -> Option<std::cmp::Ordering> {
|
||||
let a = match self {
|
||||
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)
|
||||
Some(self.cmp(other))
|
||||
}
|
||||
}
|
||||
|
||||
@ -285,7 +276,7 @@ impl<R: Rng + SeedableRng> ToolShop<R> {
|
||||
pub fn generate_tool_list(&mut self, character_level: usize) -> Vec<ToolShopItem> {
|
||||
let mut tools = Vec::new().into_iter()
|
||||
.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<_>>();
|
||||
tools.sort();
|
||||
tools
|
||||
|
Loading…
x
Reference in New Issue
Block a user