Skip to content

Commit 9d3c806

Browse files
committed
---
yaml --- r: 54015 b: refs/heads/dist-snap c: b889913 h: refs/heads/master i: 54013: 176ece6 54011: 10faa9f 54007: 747e517 53999: 3da7a3c 53983: 0b3e7b3 53951: 8da044f 53887: 33e4fda 53759: 2473e58 v: v3
1 parent df99c24 commit 9d3c806

File tree

32 files changed

+152
-162
lines changed

32 files changed

+152
-162
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
99
refs/heads/incoming: 44d4d6de762f3f9aae1fedcf454c66b79b3ad58d
10-
refs/heads/dist-snap: 0b4f2687cec898e52c47d1d93fb6317f2f4b468b
10+
refs/heads/dist-snap: b8899138f88e50841829c471b2705f2e796b9a1f
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1313
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/src/compiletest/errors.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@ fn parse_expected(line_num: uint, line: ~str) -> ~[ExpectedError] {
5151
while idx < len && line[idx] == (' ' as u8) { idx += 1u; }
5252
let start_kind = idx;
5353
while idx < len && line[idx] != (' ' as u8) { idx += 1u; }
54-
let kind = str::to_lower(str::slice(line, start_kind, idx));
54+
let kind = str::to_lower(str::slice(line, start_kind, idx).to_owned());
5555

5656
// Extract msg:
5757
while idx < len && line[idx] == (' ' as u8) { idx += 1u; }
58-
let msg = str::slice(line, idx, len);
58+
let msg = str::slice(line, idx, len).to_owned();
5959

6060
debug!("line=%u kind=%s msg=%s", line_num - adjust_line, kind, msg);
6161

branches/dist-snap/src/compiletest/header.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ fn parse_name_value_directive(line: ~str,
175175
match str::find_str(line, keycolon) {
176176
Some(colon) => {
177177
let value = str::slice(line, colon + str::len(keycolon),
178-
str::len(line));
178+
str::len(line)).to_owned();
179179
debug!("%s: %s", directive, value);
180180
Some(value)
181181
}

branches/dist-snap/src/libcore/num/strconv.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -364,14 +364,14 @@ pub pure fn to_str_bytes_common<T:NumCast+Zero+One+Eq+Ord+NumStrConv+Copy+
364364

365365
// only resize buf if we actually remove digits
366366
if i < buf_max_i {
367-
buf = buf.slice(0, i + 1);
367+
buf = buf.slice(0, i + 1).to_owned();
368368
}
369369
}
370370
} // If exact and trailing '.', just cut that
371371
else {
372372
let max_i = buf.len() - 1;
373373
if buf[max_i] == '.' as u8 {
374-
buf = buf.slice(0, max_i);
374+
buf = buf.slice(0, max_i).to_owned();
375375
}
376376
}
377377

@@ -606,7 +606,7 @@ pub pure fn from_str_bytes_common<T:NumCast+Zero+One+Ord+Copy+Div<T,T>+
606606
// parse remaining bytes as decimal integer,
607607
// skipping the exponent char
608608
let exp: Option<int> = from_str_bytes_common(
609-
buf.view(i+1, len), 10, true, false, false, ExpNone, false);
609+
buf.slice(i+1, len), 10, true, false, false, ExpNone, false);
610610

611611
match exp {
612612
Some(exp_pow) => {

branches/dist-snap/src/libcore/path.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ impl GenericPath for PosixPath {
410410
None => None,
411411
Some(ref f) => {
412412
match str::rfind_char(*f, '.') {
413-
Some(p) => Some(f.slice(0, p)),
413+
Some(p) => Some(f.slice(0, p).to_owned()),
414414
None => Some(copy *f)
415415
}
416416
}
@@ -422,7 +422,7 @@ impl GenericPath for PosixPath {
422422
None => None,
423423
Some(ref f) => {
424424
match str::rfind_char(*f, '.') {
425-
Some(p) if p < f.len() => Some(f.slice(p, f.len())),
425+
Some(p) if p < f.len() => Some(f.slice(p, f.len()).to_owned()),
426426
_ => None
427427
}
428428
}
@@ -622,7 +622,7 @@ impl GenericPath for WindowsPath {
622622
None => None,
623623
Some(ref f) => {
624624
match str::rfind_char(*f, '.') {
625-
Some(p) => Some(f.slice(0, p)),
625+
Some(p) => Some(f.slice(0, p).to_owned()),
626626
None => Some(copy *f)
627627
}
628628
}
@@ -634,7 +634,7 @@ impl GenericPath for WindowsPath {
634634
None => None,
635635
Some(ref f) => {
636636
match str::rfind_char(*f, '.') {
637-
Some(p) if p < f.len() => Some(f.slice(p, f.len())),
637+
Some(p) if p < f.len() => Some(f.slice(p, f.len()).to_owned()),
638638
_ => None
639639
}
640640
}
@@ -842,8 +842,8 @@ pub mod windows {
842842
let mut i = 2;
843843
while i < s.len() {
844844
if is_sep(s[i]) {
845-
let pre = s.slice(2, i);
846-
let mut rest = s.slice(i, s.len());
845+
let pre = s.slice(2, i).to_owned();
846+
let mut rest = s.slice(i, s.len()).to_owned();
847847
return Some((pre, rest));
848848
}
849849
i += 1;
@@ -860,9 +860,9 @@ pub mod windows {
860860
let rest = if s.len() == 2 {
861861
~""
862862
} else {
863-
s.slice(2, s.len())
863+
s.slice(2, s.len()).to_owned()
864864
};
865-
return Some((s.slice(0,1), rest));
865+
return Some((s.slice(0,1).to_owned(), rest));
866866
}
867867
None
868868
}

branches/dist-snap/src/libcore/rt/uv.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -878,7 +878,7 @@ fn listen() {
878878
if status.is_none() {
879879
rtdebug!("got %d bytes", nread);
880880
let buf = buf.unwrap();
881-
for buf.view(0, nread as uint).each |byte| {
881+
for buf.slice(0, nread as uint).each |byte| {
882882
fail_unless!(*byte == count as u8);
883883
rtdebug!("%u", *byte as uint);
884884
count += 1;

branches/dist-snap/src/libcore/run.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ fn read_all(rd: io::Reader) -> ~str {
303303
let mut bytes = [0, ..4096];
304304
while !rd.eof() {
305305
let nread = rd.read(bytes, bytes.len());
306-
wr.write(bytes.view(0, nread));
306+
wr.write(bytes.slice(0, nread));
307307
}
308308
});
309309
str::from_bytes(buf)
@@ -404,7 +404,7 @@ pub fn readclose(fd: c_int) -> ~str {
404404
let mut bytes = [0, ..4096];
405405
while !reader.eof() {
406406
let nread = reader.read(bytes, bytes.len());
407-
writer.write(bytes.view(0, nread));
407+
writer.write(bytes.slice(0, nread));
408408
}
409409
});
410410
os::fclose(file);

0 commit comments

Comments
 (0)