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

chore: address clippy lints

This commit is contained in:
Rob Ede
2024-06-05 04:56:46 +01:00
parent e0ae11ab86
commit 3e621db606
4 changed files with 4 additions and 3 deletions

View File

@ -150,7 +150,7 @@ impl StreamHandler<Result<ws::Message, ws::ProtocolError>> for WsChatSession {
}
"/join" => {
if v.len() == 2 {
self.room = v[1].to_owned();
v[1].clone_into(&mut self.room);
self.addr.do_send(server::Join {
id: self.id,
name: self.room.clone(),

View File

@ -103,7 +103,7 @@ impl StreamHandler<Result<ChatRequest, io::Error>> for ChatSession {
}
Ok(ChatRequest::Join(name)) => {
println!("Join to room: {name}");
self.room = name.clone();
name.clone_into(&mut self.room);
self.addr.do_send(server::Join {
id: self.id,
name: name.clone(),

View File

@ -154,7 +154,7 @@ impl StreamHandler<Result<ws::Message, ws::ProtocolError>> for WsChatSession {
}
"/join" => {
if v.len() == 2 {
self.room = v[1].to_owned();
v[1].clone_into(&mut self.room);
self.addr.do_send(server::Join {
id: self.id,
name: self.room.clone(),