Update with master changes

This commit is contained in:
Alex Crichton 2014-07-07 06:27:09 -07:00
parent ae1efeedf5
commit c097d985cc
6 changed files with 8 additions and 12 deletions

@ -1 +1 @@
Subproject commit b8d306fd2e96bafa3dbbc8da72fd787c4f77978f
Subproject commit bbb7848676698ec94d186e2c910ab82452d07433

@ -1 +1 @@
Subproject commit 6e0701caa513e11f939899c4d6c258537796c0d3
Subproject commit 624d5398184ccd500c3ce02338006f32f380fcc9

View File

@ -1,5 +1,4 @@
use semver;
use url;
use url::Url;
use std::fmt;
use std::fmt::{Show,Formatter};
@ -38,7 +37,7 @@ trait ToUrl {
impl<'a> ToUrl for &'a str {
fn to_url(self) -> Result<Url, String> {
url::from_str(self)
Url::parse(self)
}
}

View File

@ -58,7 +58,6 @@ pub fn resolve<R: Registry>(deps: &[Dependency],
#[cfg(test)]
mod test {
use url;
use hamcrest::{assert_that, equal_to, contains};
use core::source::{SourceId, RegistryKind, Location, Remote};
@ -71,7 +70,7 @@ mod test {
impl ToDep for &'static str {
fn to_dep(self) -> Dependency {
let url = url::from_str("http://example.com").unwrap();
let url = from_str("http://example.com").unwrap();
let source_id = SourceId::new(RegistryKind, Remote(url));
Dependency::parse(self, Some("1.0.0"), &source_id).unwrap()
}
@ -107,7 +106,7 @@ mod test {
}
fn dep(name: &str) -> Dependency {
let url = url::from_str("http://example.com").unwrap();
let url = from_str("http://example.com").unwrap();
let source_id = SourceId::new(RegistryKind, Remote(url));
Dependency::parse(name, Some("1.0.0"), &source_id).unwrap()
}

View File

@ -1,7 +1,6 @@
use std::fmt;
use std::fmt::{Show, Formatter};
use url;
use url::Url;
use core::{Summary, Package, PackageId};
@ -82,7 +81,7 @@ impl Location {
if s.starts_with("file:") {
Ok(Local(Path::new(s.slice_from(5))))
} else {
url::from_str(s).map(Remote).map_err(|e| {
Url::parse(s).map(Remote).map_err(|e| {
human(format!("invalid url `{}`: `{}", s, e))
})
}
@ -146,7 +145,7 @@ impl SourceId {
pub fn for_central() -> SourceId {
SourceId::new(RegistryKind,
Remote(url::from_str("https://example.com").unwrap()))
Remote(Url::parse("https://example.com").unwrap()))
}
pub fn get_location<'a>(&'a self) -> &'a Location {

View File

@ -181,7 +181,6 @@ impl<'a, 'b> Source for GitSource<'a, 'b> {
#[cfg(test)]
mod test {
use url;
use url::Url;
use core::source::Remote;
use super::ident;
@ -227,6 +226,6 @@ mod test {
}
fn url(s: &str) -> Url {
url::from_str(s).unwrap()
from_str(s).unwrap()
}
}