Skip to content

Commit 1573c06

Browse files
committed
---
yaml --- r: 63158 b: refs/heads/snap-stage3 c: ee41ad4 h: refs/heads/master v: v3
1 parent 29ed4eb commit 1573c06

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 2d28d645422c1617be58c8ca7ad9a457264ca850
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: c32fb53cf9ae20a657d17bd8e2f0b36863096583
4+
refs/heads/snap-stage3: ee41ad4168a0e9316d8621ad5ceda2208c553f76
55
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/librustpkg/version.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ extern mod std;
1515

1616
use extra::semver;
1717
use core::prelude::*;
18+
use core::iterator::IteratorUtil;
1819
use core::{char, os, result, run, str};
1920
use package_path::RemotePath;
2021
use extra::tempfile::mkdtemp;
@@ -112,7 +113,7 @@ pub fn try_getting_version(remote_path: &RemotePath) -> Option<Version> {
112113
~"tag", ~"-l"]);
113114
let output_text = str::from_bytes(outp.output);
114115
debug!("Full output: ( %s ) [%?]", output_text, outp.status);
115-
for output_text.each_split_char('\n') |l| {
116+
for output_text.line_iter().advance |l| {
116117
debug!("A line of output: %s", l);
117118
if !l.is_whitespace() {
118119
output = Some(l);
@@ -162,11 +163,8 @@ fn try_parsing_version(s: &str) -> Option<Version> {
162163

163164
/// Just an approximation
164165
fn is_url_like(p: &RemotePath) -> bool {
165-
let mut n = 0;
166-
for p.to_str().each_split_char('/') |_| {
167-
n += 1;
168-
}
169-
n > 2
166+
let str = p.to_str();
167+
str.split_iter('/').count() > 2
170168
}
171169

172170
/// If s is of the form foo#bar, where bar is a valid version

branches/snap-stage3/src/libstd/run.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
1313
#[allow(missing_doc)];
1414

15+
use iterator::IteratorUtil;
1516
use cast;
1617
use comm::{stream, SharedChan, GenericChan, GenericPort};
1718
use int;

0 commit comments

Comments
 (0)