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