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(), user_name: peer.user_name.clone(),
connection_type: peer.connection_type.clone(), connection_type: peer.connection_type.clone(),
}), }),
))
.unwrap();
)).unwrap();
} }
PeerState::OpeningFirewalled => { PeerState::OpeningFirewalled => {
@ -371,8 +370,7 @@ impl Client {
token: peer.token, token: peer.token,
user_name: peer.user_name, user_name: peer.user_name,
}), }),
))
.unwrap();
)).unwrap();
} }
} }
} }
@ -519,8 +517,7 @@ impl Client {
peer_id, peer_id,
response.ip, response.ip,
response.port, response.port,
))
.unwrap();
)).unwrap();
} }
Err(peer) => { 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 { .with_settings(ws::Settings {
max_connections: 1, max_connections: 1,
..ws::Settings::default() ..ws::Settings::default()
})
.build(|socket_tx| Handler {
}).build(|socket_tx| Handler {
client_tx: client_tx.clone(), client_tx: client_tx.clone(),
socket_tx: socket_tx, socket_tx: socket_tx,
}); });
@ -173,8 +172,7 @@ pub fn listen(client_tx: mpsc::Sender<Notification>) {
.send(Notification::Error(format!( .send(Notification::Error(format!(
"Unable to build websocket: {}", "Unable to build websocket: {}",
e e
)))
.unwrap();
))).unwrap();
return; return;
} }
}; };
@ -189,8 +187,7 @@ pub fn listen(client_tx: mpsc::Sender<Notification>) {
.send(Notification::Error(format!( .send(Notification::Error(format!(
"Unable to listen on websocket: {}", "Unable to listen on websocket: {}",
e e
)))
.unwrap();
))).unwrap();
} }
} }
} }

Loading…
Cancel
Save