From: Geoffrey Allott Date: Fri, 4 Aug 2023 20:02:58 +0000 (+0100) Subject: fix clippy warnings X-Git-Url: https://git.pointlesshacks.com/?a=commitdiff_plain;h=0b135047d70c9ee6442b17d581c579d892e4517f;p=pokerwave.git fix clippy warnings --- diff --git a/src/game/cribbage/mod.rs b/src/game/cribbage/mod.rs index ca5efb7..132b87e 100644 --- a/src/game/cribbage/mod.rs +++ b/src/game/cribbage/mod.rs @@ -335,9 +335,7 @@ impl Game for Cribbage { } } self.pegging_cards.push((username, card)); - if self.next_player_still_in().is_none() { - self.state = State::ScoringPegging; - } else if self.last_pegging_score().is_some() { + if self.next_player_still_in().is_none() || self.last_pegging_score().is_some() { self.state = State::ScoringPegging; } else { self.active = self.next_player_still_in(); diff --git a/src/main.rs b/src/main.rs index a773700..ba60706 100644 --- a/src/main.rs +++ b/src/main.rs @@ -72,7 +72,7 @@ async fn append_cache_control(mut response: Response) -> Result RedisResult<()> { let keyspace_events: Vec = cmd("CONFIG").arg("GET").arg("notify-keyspace-events").query_async(conn).await?; - if keyspace_events.len() != 2 || !keyspace_events[1].contains("K") { + if keyspace_events.len() != 2 || !keyspace_events[1].contains('K') { warn!("Redis \"CONFIG GET notify-keyspace-events\" returned {:?}. Keyspace events must be enabled for proper functioning.", keyspace_events); } Ok(())