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:
@ -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")
|
||||
|
@ -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);
|
||||
|
Reference in New Issue
Block a user