Browse Source

Run cargo fmt.

wip
Titouan Rigoudy 7 years ago
parent
commit
8daeb74b53
2 changed files with 6 additions and 12 deletions
  1. +3
    -6
      src/client.rs
  2. +3
    -6
      src/control/ws.rs

+ 3
- 6
src/client.rs View File

@ -354,8 +354,7 @@ impl Client {
user_name: peer.user_name.clone(),
connection_type: peer.connection_type.clone(),
}),
))
.unwrap();
)).unwrap();
}
PeerState::OpeningFirewalled => {
@ -371,8 +370,7 @@ impl Client {
token: peer.token,
user_name: peer.user_name,
}),
))
.unwrap();
)).unwrap();
}
}
}
@ -519,8 +517,7 @@ impl Client {
peer_id,
response.ip,
response.port,
))
.unwrap();
)).unwrap();
}
Err(peer) => {


+ 3
- 6
src/control/ws.rs View File

@ -159,8 +159,7 @@ pub fn listen(client_tx: mpsc::Sender<Notification>) {
.with_settings(ws::Settings {
max_connections: 1,
..ws::Settings::default()
})
.build(|socket_tx| Handler {
}).build(|socket_tx| Handler {
client_tx: client_tx.clone(),
socket_tx: socket_tx,
});
@ -173,8 +172,7 @@ pub fn listen(client_tx: mpsc::Sender<Notification>) {
.send(Notification::Error(format!(
"Unable to build websocket: {}",
e
)))
.unwrap();
))).unwrap();
return;
}
};
@ -189,8 +187,7 @@ pub fn listen(client_tx: mpsc::Sender<Notification>) {
.send(Notification::Error(format!(
"Unable to listen on websocket: {}",
e
)))
.unwrap();
))).unwrap();
}
}
}

Loading…
Cancel
Save