зеркало из https://github.com/mozilla/gecko-dev.git
geckodriver: Merge pull request #54 from juangj/master
Allow binding to an IPv6 address, if specified. Source-Repo: https://github.com/mozilla/geckodriver Source-Revision: 97c5216be449b0a6218985ca520b74c42b6d6843 --HG-- extra : rebase_source : d6a6018a2f630bab0f0ab798fe528e541d0b9f85
This commit is contained in:
Родитель
9a9b9e3271
Коммит
eeadc2a57e
|
@ -12,7 +12,7 @@ extern crate webdriver;
|
|||
|
||||
use std::borrow::ToOwned;
|
||||
use std::process::exit;
|
||||
use std::net::{SocketAddr, SocketAddrV4, Ipv4Addr};
|
||||
use std::net::{SocketAddr, IpAddr};
|
||||
use std::str::FromStr;
|
||||
use std::path::Path;
|
||||
|
||||
|
@ -89,8 +89,8 @@ fn main() {
|
|||
|
||||
let host = &opts.webdriver_host[..];
|
||||
let port = opts.webdriver_port;
|
||||
let addr = Ipv4Addr::from_str(host).map(
|
||||
|x| SocketAddr::V4(SocketAddrV4::new(x, port))).unwrap_or_else(
|
||||
let addr = IpAddr::from_str(host).map(
|
||||
|x| SocketAddr::new(x, port)).unwrap_or_else(
|
||||
|_| {
|
||||
println!("Invalid host address");
|
||||
exit(1);
|
||||
|
|
Загрузка…
Ссылка в новой задаче