Update according the new nightly build.
[crypto_lab1.git] / lab1_rust / src / end_point.rs
index 128a017..bf8d4de 100644 (file)
@@ -23,7 +23,7 @@ pub struct EndPoint {
 
 impl Server {
    pub fn new(interface: &str, port: u16, variant: packet::Variant) -> IoResult<Server> {
-      let mut acceptor = try!(TcpListener::bind(interface, port).listen());
+      let mut acceptor = try!(TcpListener::bind((interface, port)).listen());
 
       let server = Server {
          acceptor: acceptor.clone()
@@ -77,7 +77,7 @@ impl Server {
 impl Client {
    pub fn new(address: &str, port: u16, variant: packet::Variant) -> IoResult<Client> {
       Ok(Client { end_point: EndPoint {
-         socket: try!(TcpStream::connect(address, port)),
+         socket: try!(TcpStream::connect((address, port))),
          current_timestamp: 0,
          variant: variant,
       }})