Fixed deprecation warnings.

This commit is contained in:
Aaron Weiss 2017-10-02 17:00:46 +02:00
parent 77e28b84ba
commit c992fbdf77
No known key found for this signature in database
GPG key ID: 0237035D9BF03AE2
2 changed files with 4 additions and 4 deletions

View file

@ -119,7 +119,7 @@ impl Connection {
println!("Added {} to trusted certificates.", cert_path); println!("Added {} to trusted certificates.", cert_path);
} }
let connector = builder.build()?; let connector = builder.build()?;
let stream = TcpStream::connect(&config.socket_addr(), handle) let stream = Box::new(TcpStream::connect(&config.socket_addr(), handle)
.map_err(|e| { .map_err(|e| {
let res: error::Error = e.into(); let res: error::Error = e.into();
res res
@ -128,8 +128,8 @@ impl Connection {
connector.connect_async(&domain, socket).map_err( connector.connect_async(&domain, socket).map_err(
|e| e.into(), |e| e.into(),
) )
}) }
.boxed(); ));
Ok(ConnectionFuture::Secured(config, stream)) Ok(ConnectionFuture::Secured(config, stream))
} else { } else {
Ok(ConnectionFuture::Unsecured( Ok(ConnectionFuture::Unsecured(

View file

@ -121,7 +121,7 @@ impl<'a> Server for ServerState {
{ {
let msg = &msg.into(); let msg = &msg.into();
self.handle_sent_message(&msg)?; self.handle_sent_message(&msg)?;
Ok((&self.outgoing).send( Ok((&self.outgoing).unbounded_send(
ServerState::sanitize(&msg.to_string()) ServerState::sanitize(&msg.to_string())
.into(), .into(),
)?) )?)