Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix warning: Stop to use deprecated 'SocketAddr::new'
  • Loading branch information
tetsuharuohzeki committed Dec 11, 2015
1 parent 196f15b commit 4906b38
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions components/webdriver_server/lib.rs
Expand Up @@ -5,7 +5,7 @@
#![crate_name = "webdriver_server"]
#![crate_type = "rlib"]

#![feature(ip_addr, plugin)]
#![feature(plugin)]
#![plugin(plugins)]

extern crate compositing;
Expand Down Expand Up @@ -37,7 +37,7 @@ use rustc_serialize::base64::{CharacterSet, Config, Newline, ToBase64};
use rustc_serialize::json::{Json, ToJson};
use std::borrow::ToOwned;
use std::collections::BTreeMap;
use std::net::SocketAddr;
use std::net::{SocketAddr, SocketAddrV4};
use std::sync::mpsc::Sender;
use std::thread;
use std::time::Duration;
Expand All @@ -63,7 +63,8 @@ fn extension_routes() -> Vec<(Method, &'static str, ServoExtensionRoute)> {
pub fn start_server(port: u16, constellation_chan: Sender<ConstellationMsg>) {
let handler = Handler::new(constellation_chan);
spawn_named("WebdriverHttpServer".to_owned(), move || {
server::start(SocketAddr::new("0.0.0.0".parse().unwrap(), port), handler,
let address = SocketAddrV4::new("0.0.0.0".parse().unwrap(), port);
server::start(SocketAddr::V4(address), handler,
extension_routes());
});
}
Expand Down

0 comments on commit 4906b38

Please sign in to comment.