File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -112,6 +112,7 @@ impl CommunicationActorState {
112112 } ,
113113 CommunicationActorMessage :: ClientData ( buf) => {
114114 use rand:: Rng ;
115+
115116 let mut rng = rand:: thread_rng ( ) ;
116117
117118 // Try sending though a random port
@@ -147,7 +148,7 @@ pub async fn client(
147148 name : String ,
148149 pco : PlayloadCommunicationOptions ,
149150 cs : ClientSettings ,
150- ) -> Result < ! > {
151+ ) -> Result < ( ) > {
151152 let sendaddr = pco. sendto ;
152153 let bindaddr = if let Some ( x) = pco. bind {
153154 x
Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ struct ServerMetrics {
9595 snderr : u64 ,
9696}
9797
98- async fn server ( sa : SocketAddr ) -> Result < ! > {
98+ async fn server ( sa : SocketAddr ) -> Result < ( ) > {
9999 use ttl_cache:: TtlCache ;
100100
101101 type Registry = TtlCache < String , TtlCache < SocketAddr , ( ) > > ;
@@ -235,7 +235,7 @@ async fn main() -> Result<()> {
235235 if opt. cs . keepalive_interval != 30 {
236236 eprintln ! ( "--keepalive-interval is meaningless in server mode" ) ;
237237 }
238- server ( sa) . await ?
238+ server ( sa) . await ?;
239239 } else {
240240 if opt. name . is_none ( ) {
241241 Err ( "--name is required in client mode" ) ?;
@@ -246,6 +246,7 @@ async fn main() -> Result<()> {
246246 let name = opt. name . unwrap ( ) ;
247247 let sa = opt. client . unwrap ( ) ;
248248
249- client:: client ( sa, name, opt. pco , opt. cs ) . await ?
249+ client:: client ( sa, name, opt. pco , opt. cs ) . await ?;
250250 }
251+ Ok ( ( ) )
251252}
You can’t perform that action at this time.
0 commit comments