mirror of
https://github.com/actix/examples
synced 2024-11-27 07:52:57 +01:00
chore: address clippy lints
This commit is contained in:
parent
e0ae11ab86
commit
3e621db606
@ -168,6 +168,7 @@ impl QueryRoot {
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(clippy::duplicated_attributes)] // false positive
|
||||
#[derive(Interface)]
|
||||
#[graphql(
|
||||
field(name = "id", ty = "&str"),
|
||||
|
@ -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(),
|
||||
|
@ -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(),
|
||||
|
@ -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(),
|
||||
|
Loading…
Reference in New Issue
Block a user