diff options
Diffstat (limited to 'src/librustpkg/version.rs')
| -rw-r--r-- | src/librustpkg/version.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/librustpkg/version.rs b/src/librustpkg/version.rs index 7431b5e4c01..1ec15c107c7 100644 --- a/src/librustpkg/version.rs +++ b/src/librustpkg/version.rs @@ -14,8 +14,7 @@ extern mod std; use extra::semver; -use core::prelude::*; -use core::{char, os, result, run, str}; +use std::{char, os, result, run, str}; use package_path::RemotePath; use extra::tempfile::mkdtemp; @@ -155,7 +154,7 @@ fn try_parsing_version(s: &str) -> Option<Version> { /// Just an approximation fn is_url_like(p: &RemotePath) -> bool { let str = p.to_str(); - str.split_iter('/').count() > 2 + str.split_iter('/').len_() > 2 } /// If s is of the form foo#bar, where bar is a valid version @@ -170,7 +169,7 @@ pub fn split_version_general<'a>(s: &'a str, sep: char) -> Option<(&'a str, Vers for s.split_iter(sep).advance |st| { debug!("whole = %s part = %s", s, st); } - if s.split_iter(sep).count() > 2 { + if s.split_iter(sep).len_() > 2 { return None; } match s.rfind(sep) { @@ -208,4 +207,4 @@ fn test_split_version() { let s = "a#1.2"; assert!(split_version(s) == Some((s.slice(0, 1), ExactRevision(~"1.2")))); assert!(split_version("a#a#3.4") == None); -} \ No newline at end of file +} |
