Remove the now unused servo_util::url module.

This commit is contained in:
Simon Sapin 2014-07-19 18:45:28 +01:00
parent 6917fbf28e
commit b84065f574
2 changed files with 0 additions and 32 deletions

View file

@ -1,30 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use rust_url;
use rust_url::{Url, UrlParser};
/**
Create a URL object from a string. Does various helpful browsery things like
* If there's no current url and the path looks like a file then it will
create a file url based of the current working directory
* If there's a current url and the new path is relative then the new url
is based off the current url
*/
// TODO: about:failure->
pub fn try_parse_url(str_url: &str, base_url: Option<Url>) -> Result<Url, &'static str> {
let mut parser = UrlParser::new();
let parser = match base_url {
Some(ref base) => &*parser.base_url(base),
None => &parser,
};
parser.parse(str_url.as_slice())
}
pub fn parse_url(str_url: &str, base_url: Option<rust_url::Url>) -> rust_url::Url {
// FIXME: Need to handle errors
try_parse_url(str_url, base_url).ok().expect("URL parsing failed")
}

View file

@ -28,7 +28,6 @@ extern crate sync;
#[cfg(target_os="macos")]
extern crate task_info;
extern crate std_time = "time";
extern crate rust_url = "url_";
extern crate string_cache;
pub mod atom;
@ -45,6 +44,5 @@ pub mod sort;
pub mod str;
pub mod task;
pub mod time;
pub mod url;
pub mod vec;
pub mod workqueue;