projects
/
pokerwave.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0e69485
)
filter incoming new games
author
Geoffrey Allott
<geoffrey@allott.email>
Thu, 18 Mar 2021 20:23:00 +0000
(20:23 +0000)
committer
Geoffrey Allott
<geoffrey@allott.email>
Thu, 18 Mar 2021 20:23:00 +0000
(20:23 +0000)
src/client.rs
patch
|
blob
|
history
diff --git
a/src/client.rs
b/src/client.rs
index 850980d069184e689603c9ea738c3c3f9dfb52a1..1cc8618a27ee32962785ad3a5b5b47470c3a4cef 100644
(file)
--- a/
src/client.rs
+++ b/
src/client.rs
@@
-47,6
+47,7
@@
impl ConnectionState {
match self.server.game_list(from).await {
Ok(games) => {
game_list.update(games.len());
+ let games: Vec<_> = games.into_iter().filter(|game| game_list.matches(game)).collect();
iter(games).map(|game| ServerMessage::NewGame { game }).boxed()
}
Err(err) => once(async move { ServerMessage::ProtocolError { reason: err.to_string() } }).boxed(),