1
0
mirror of https://github.com/actix/examples synced 2025-06-26 17:17:42 +02:00

fix: remaining upgrade issues

This commit is contained in:
Rob Ede
2023-08-29 18:56:00 +01:00
parent 09dad8f836
commit 72d0d1eb4b
8 changed files with 17 additions and 16 deletions

View File

@ -130,7 +130,7 @@ impl ChatServer {
// auto join session to main room
self.rooms
.entry("main".to_owned())
.or_insert_with(HashSet::new)
.or_default()
.insert(id);
let count = self.visitor_count.fetch_add(1, Ordering::SeqCst);
@ -187,7 +187,7 @@ impl ChatServer {
self.rooms
.entry(room.clone())
.or_insert_with(HashSet::new)
.or_default()
.insert(conn_id);
self.send_system_message(&room, conn_id, "Someone connected")

View File

@ -131,7 +131,7 @@ impl Handler<Connect> for ChatServer {
// auto join session to main room
self.rooms
.entry("main".to_owned())
.or_insert_with(HashSet::new)
.or_default()
.insert(id);
let count = self.visitor_count.fetch_add(1, Ordering::SeqCst);
@ -213,7 +213,7 @@ impl Handler<Join> for ChatServer {
self.rooms
.entry(name.clone())
.or_insert_with(HashSet::new)
.or_default()
.insert(id);
self.send_message(&name, "Someone connected", id);