diff --git a/src/components/util/url.rs b/src/components/util/url.rs deleted file mode 100644 index 6876c150d6f..00000000000 --- a/src/components/util/url.rs +++ /dev/null @@ -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) -> Result { - 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 { - // FIXME: Need to handle errors - try_parse_url(str_url, base_url).ok().expect("URL parsing failed") -} diff --git a/src/components/util/util.rs b/src/components/util/util.rs index ba983060c80..92f1995cce4 100644 --- a/src/components/util/util.rs +++ b/src/components/util/util.rs @@ -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;