std: fix compile & test
This commit is contained in:
parent
c32fb53cf9
commit
ee41ad4168
@ -15,6 +15,7 @@
|
|||||||
|
|
||||||
use extra::semver;
|
use extra::semver;
|
||||||
use core::prelude::*;
|
use core::prelude::*;
|
||||||
|
use core::iterator::IteratorUtil;
|
||||||
use core::{char, os, result, run, str};
|
use core::{char, os, result, run, str};
|
||||||
use package_path::RemotePath;
|
use package_path::RemotePath;
|
||||||
use extra::tempfile::mkdtemp;
|
use extra::tempfile::mkdtemp;
|
||||||
@ -112,7 +113,7 @@ pub fn try_getting_version(remote_path: &RemotePath) -> Option<Version> {
|
|||||||
~"tag", ~"-l"]);
|
~"tag", ~"-l"]);
|
||||||
let output_text = str::from_bytes(outp.output);
|
let output_text = str::from_bytes(outp.output);
|
||||||
debug!("Full output: ( %s ) [%?]", output_text, outp.status);
|
debug!("Full output: ( %s ) [%?]", output_text, outp.status);
|
||||||
for output_text.each_split_char('\n') |l| {
|
for output_text.line_iter().advance |l| {
|
||||||
debug!("A line of output: %s", l);
|
debug!("A line of output: %s", l);
|
||||||
if !l.is_whitespace() {
|
if !l.is_whitespace() {
|
||||||
output = Some(l);
|
output = Some(l);
|
||||||
@ -162,11 +163,8 @@ fn try_parsing_version(s: &str) -> Option<Version> {
|
|||||||
|
|
||||||
/// Just an approximation
|
/// Just an approximation
|
||||||
fn is_url_like(p: &RemotePath) -> bool {
|
fn is_url_like(p: &RemotePath) -> bool {
|
||||||
let mut n = 0;
|
let str = p.to_str();
|
||||||
for p.to_str().each_split_char('/') |_| {
|
str.split_iter('/').count() > 2
|
||||||
n += 1;
|
|
||||||
}
|
|
||||||
n > 2
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// If s is of the form foo#bar, where bar is a valid version
|
/// If s is of the form foo#bar, where bar is a valid version
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
|
|
||||||
#[allow(missing_doc)];
|
#[allow(missing_doc)];
|
||||||
|
|
||||||
|
use iterator::IteratorUtil;
|
||||||
use cast;
|
use cast;
|
||||||
use comm::{stream, SharedChan, GenericChan, GenericPort};
|
use comm::{stream, SharedChan, GenericChan, GenericPort};
|
||||||
use int;
|
use int;
|
||||||
|
Loading…
Reference in New Issue
Block a user