1
0
mirror of https://git.ngram.ca/OpenJam/rc-servers synced 2026-08-23 23:08:52 +00:00

Fix minor clippy warnings

This commit is contained in:
NG (Graham)
2026-01-12 18:10:51 -05:00
parent 7b7da8d59e
commit 6bcd812738
2 changed files with 2 additions and 1 deletions

View File

@@ -1052,7 +1052,7 @@ impl <C: Clone + Send> super::User<C> for UserData {
log::error!("No selected vehicle slot for user_id {}", self.account.id);
DATABASE_ERR
})?;
let inc_opt = self.garage_upgrades.increments.iter().enumerate().filter(|(_i, inc)| inc.cpu <= selected_slot.bay_cpu as u32).next_back();
let inc_opt = self.garage_upgrades.increments.iter().enumerate().rfind(|(_i, inc)| inc.cpu <= selected_slot.bay_cpu as u32);
if let Some((i, _)) = inc_opt {
let max_upgrade = self.garage_upgrades.increments.len() - 1;
let upgrade_to = i + (increments as usize);

View File

@@ -188,6 +188,7 @@ impl QueueHandler {
).await
}
#[allow(clippy::too_many_arguments)]
async fn enter_match_static(hostname: String, hostport: u16, network_conf: crate::data::network::NetworkConfigData, factory: std::sync::Arc<oj_rc_core::factory::Factory>, cpu_counter: std::sync::Arc<oj_rc_core::cubes::CpuListParser>, weapon_guesser: std::sync::Arc<oj_rc_core::cubes::WeaponListParser>, users_per_game: usize, key: QueueKey, mut players: Vec<QueueUser>, user: &(dyn oj_rc_core::persist::user::LobbyUser + Send + Sync)) {
let guid_str = key.guid();
let game_desc = oj_rc_core::persist::user::GameDescriptor {