Fix some clippy warnings and update dependencies

This commit is contained in:
NG (Graham) committed 2026-03-21 18:07:03 -04:00
1 parent 289827ec3b
commit 27da413ed1
4 files changed
+206 -170

No files matched your search

Generated
+199 -167
View File
File diff suppressed because it is too large. Load diff
+1 -1
View File
@@ -91,7 +91,7 @@ impl TeamChooser for TwoTeamPartyAware {
if let Some(platoon_id) = &player.group {
bal_info.platoons.insert(platoon_id.to_owned(), chosen_team);
}
return chosen_team as i32;
chosen_team as i32
} else {
Self::do_cleanup(&mut lock);
let init_info = if let Some(platoon) = &player.group {
+5 -2
View File
@@ -428,9 +428,12 @@ pub struct IntercomListener<D: serde::de::DeserializeOwned> {
}
impl <D: serde::de::DeserializeOwned> IntercomListener<D> {
pub async fn listen(self) -> impl futures::Stream<Item=Result<D, reqwest_websocket::Error>> + Unpin {
pub async fn listen(self) -> impl futures::Stream<Item=Result<D, Box<reqwest_websocket::Error>>> + Unpin {
use futures::StreamExt;
self.websocket.map(|msg| msg.and_then(|msg| msg.json()))
self.websocket.map(|msg|
msg.map_err(Box::new)
.and_then(|msg| msg.json().map_err(Box::new))
)
}
}
+1
View File
@@ -581,6 +581,7 @@ impl QueueHandler {
}
}
#[allow(clippy::too_many_arguments)]
pub async fn join_queue(&self, map: String, mode: oj_rc_core::data::game_mode::GameMode, visibility: oj_rc_core::data::game_mode::MapVisibility, auto_heal: bool, user: std::sync::Arc<Box<dyn oj_rc_core::persist::user::User<()> + Send + Sync>>, event_emitter: polariton_server::events::EventEmitter, platoon: Option<PlatoonInfo>) {
if !self.is_enabled {
event_emitter.emit(crate::events::enqueue_error::QueueJoinError {