No longer use deprecated function Multiaddr::new

This commit is contained in:
Pierre Krieger
2017-12-28 18:07:49 +01:00
parent 4603061e92
commit acbe1d0386
15 changed files with 81 additions and 104 deletions

View File

@ -117,7 +117,7 @@ fn main() {
// We now use the controller to listen on the address.
let address = swarm_controller
.listen_on(swarm::Multiaddr::new(&listen_addr).expect("invalid multiaddr"))
.listen_on(listen_addr.parse().expect("invalid multiaddr"))
// If the multiaddr protocol exists but is not supported, then we get an error containing
// the original multiaddress.
.expect("unsupported multiaddr");