Skip to content

Commit 1bf69f6

Browse files
committed
---
yaml --- r: 50098 b: refs/heads/auto c: ee2f3d9 h: refs/heads/master v: v3
1 parent 549bf71 commit 1bf69f6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+1568
-965
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1414
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1515
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1616
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
17-
refs/heads/auto: 5acfe3d5376d58a549b508e4fbfe21cf31a79396
17+
refs/heads/auto: ee2f3d9673407db3ca5a0eb24e01ef52c7fc676c
1818
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167

branches/auto/doc/tutorial.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1363,11 +1363,11 @@ let crayon_names = crayons.map(|v| crayon_to_str(*v));
13631363
let favorite_crayon_name = crayon_names[0];
13641364
13651365
// Remove whitespace from before and after the string
1366-
let new_favorite_crayon_name = favorite_crayon_name.trim();
1366+
let new_favorite_crayon_name = favorite_crayon_name.trim_DBGBRWD();
13671367
13681368
if favorite_crayon_name.len() > 5 {
13691369
// Create a substring
1370-
println(favorite_crayon_name.substr(0, 5));
1370+
println(favorite_crayon_name.substr_DBGBRWD(0, 5));
13711371
}
13721372
~~~
13731373

branches/auto/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/auto/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/auto/src/compiletest/runtest.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ fn run_debuginfo_test(config: config, props: TestProps, testfile: &Path) {
268268
// output (in order)
269269
let mut i = 0u;
270270
for str::lines(ProcRes.stdout).each |line| {
271-
if props.check_lines[i].trim() == line.trim() {
271+
if props.check_lines[i].trim_DBGBRWD() == line.trim_DBGBRWD() {
272272
i += 1u;
273273
}
274274
if i == num_check_lines {

branches/auto/src/libcore/core.rc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ pub use path::WindowsPath;
198198
pub use path::PosixPath;
199199

200200
pub use tuple::{CopyableTuple, ImmutableTuple, ExtendedTupleOps};
201-
pub use str::{StrSlice, Trimmable};
201+
pub use str::{StrSlice};
202202
pub use container::{Container, Mutable};
203203
pub use vec::{CopyableVector, ImmutableVector};
204204
pub use vec::{ImmutableEqVector, ImmutableCopyableVector};

branches/auto/src/libcore/io.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1204,9 +1204,11 @@ pub fn read_whole_file(file: &Path) -> Result<~[u8], ~str> {
12041204
// fsync related
12051205

12061206
pub mod fsync {
1207-
use prelude::*;
12081207
use io::{FILERes, FdRes, fd_t};
1208+
use kinds::Copy;
12091209
use libc;
1210+
use ops::Drop;
1211+
use option::{None, Option, Some};
12101212
use os;
12111213

12121214
pub enum Level {

branches/auto/src/libcore/libc.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,6 @@ pub mod types {
230230
pub type uintptr_t = uint;
231231
}
232232
pub mod posix88 {
233-
use prelude::*;
234-
235233
pub type off_t = i32;
236234
pub type dev_t = u64;
237235
pub type ino_t = u32;

branches/auto/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/auto/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/auto/src/libcore/prelude.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ pub use path::Path;
3636
pub use path::PosixPath;
3737
pub use path::WindowsPath;
3838
pub use ptr::Ptr;
39-
pub use str::{StrSlice, Trimmable, OwnedStr};
39+
pub use str::{StrSlice, OwnedStr};
4040
pub use to_bytes::IterBytes;
4141
pub use to_str::ToStr;
4242
pub use tuple::{CopyableTuple, ImmutableTuple, ExtendedTupleOps};

branches/auto/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/auto/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)