Skip to content

Commit ab49492

Browse files
committed
---
yaml --- r: 63164 b: refs/heads/snap-stage3 c: 1553874 h: refs/heads/master v: v3
1 parent e500640 commit ab49492

File tree

19 files changed

+249
-249
lines changed

19 files changed

+249
-249
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: a64e886e3c1dd38473fd7711933557f1b97a9036
4+
refs/heads/snap-stage3: 1553874149c3c37b94d75e9122092b131ba74c77
55
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/libextra/base64.rs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ impl<'self> ToBase64 for &'self [u8] {
4949
fn to_base64(&self) -> ~str {
5050
let mut s = ~"";
5151
let len = self.len();
52-
str::reserve(&mut s, ((len + 3u) / 4u) * 3u);
52+
s.reserve(((len + 3u) / 4u) * 3u);
5353

5454
let mut i = 0u;
5555

@@ -59,10 +59,10 @@ impl<'self> ToBase64 for &'self [u8] {
5959
(self[i + 2u] as uint);
6060

6161
// This 24-bit number gets separated into four 6-bit numbers.
62-
str::push_char(&mut s, CHARS[(n >> 18u) & 63u]);
63-
str::push_char(&mut s, CHARS[(n >> 12u) & 63u]);
64-
str::push_char(&mut s, CHARS[(n >> 6u) & 63u]);
65-
str::push_char(&mut s, CHARS[n & 63u]);
62+
s.push_char(CHARS[(n >> 18u) & 63u]);
63+
s.push_char(CHARS[(n >> 12u) & 63u]);
64+
s.push_char(CHARS[(n >> 6u) & 63u]);
65+
s.push_char(CHARS[n & 63u]);
6666

6767
i += 3u;
6868
}
@@ -73,18 +73,18 @@ impl<'self> ToBase64 for &'self [u8] {
7373
0 => (),
7474
1 => {
7575
let n = (self[i] as uint) << 16u;
76-
str::push_char(&mut s, CHARS[(n >> 18u) & 63u]);
77-
str::push_char(&mut s, CHARS[(n >> 12u) & 63u]);
78-
str::push_char(&mut s, '=');
79-
str::push_char(&mut s, '=');
76+
s.push_char(CHARS[(n >> 18u) & 63u]);
77+
s.push_char(CHARS[(n >> 12u) & 63u]);
78+
s.push_char('=');
79+
s.push_char('=');
8080
}
8181
2 => {
8282
let n = (self[i] as uint) << 16u |
8383
(self[i + 1u] as uint) << 8u;
84-
str::push_char(&mut s, CHARS[(n >> 18u) & 63u]);
85-
str::push_char(&mut s, CHARS[(n >> 12u) & 63u]);
86-
str::push_char(&mut s, CHARS[(n >> 6u) & 63u]);
87-
str::push_char(&mut s, '=');
84+
s.push_char(CHARS[(n >> 18u) & 63u]);
85+
s.push_char(CHARS[(n >> 12u) & 63u]);
86+
s.push_char(CHARS[(n >> 6u) & 63u]);
87+
s.push_char('=');
8888
}
8989
_ => fail!("Algebra is broken, please alert the math police")
9090
}

branches/snap-stage3/src/libextra/json.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ fn escape_str(s: &str) -> ~str {
7979

8080
fn spaces(n: uint) -> ~str {
8181
let mut ss = ~"";
82-
for n.times { str::push_str(&mut ss, " "); }
82+
for n.times { ss.push_str(" "); }
8383
return ss;
8484
}
8585

@@ -712,14 +712,14 @@ impl Parser {
712712

713713
if (escape) {
714714
match self.ch {
715-
'"' => str::push_char(&mut res, '"'),
716-
'\\' => str::push_char(&mut res, '\\'),
717-
'/' => str::push_char(&mut res, '/'),
718-
'b' => str::push_char(&mut res, '\x08'),
719-
'f' => str::push_char(&mut res, '\x0c'),
720-
'n' => str::push_char(&mut res, '\n'),
721-
'r' => str::push_char(&mut res, '\r'),
722-
't' => str::push_char(&mut res, '\t'),
715+
'"' => res.push_char('"'),
716+
'\\' => res.push_char('\\'),
717+
'/' => res.push_char('/'),
718+
'b' => res.push_char('\x08'),
719+
'f' => res.push_char('\x0c'),
720+
'n' => res.push_char('\n'),
721+
'r' => res.push_char('\r'),
722+
't' => res.push_char('\t'),
723723
'u' => {
724724
// Parse \u1234.
725725
let mut i = 0u;
@@ -748,7 +748,7 @@ impl Parser {
748748
~"invalid \\u escape (not four digits)");
749749
}
750750

751-
str::push_char(&mut res, n as char);
751+
res.push_char(n as char);
752752
}
753753
_ => return self.error(~"invalid escape")
754754
}
@@ -760,7 +760,7 @@ impl Parser {
760760
self.bump();
761761
return Ok(res);
762762
}
763-
str::push_char(&mut res, self.ch);
763+
res.push_char(self.ch);
764764
}
765765
}
766766

branches/snap-stage3/src/libextra/net_url.rs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ fn encode_inner(s: &str, full_url: bool) -> ~str {
8181
'a' .. 'z' |
8282
'0' .. '9' |
8383
'-' | '.' | '_' | '~' => {
84-
str::push_char(&mut out, ch);
84+
out.push_char(ch);
8585
}
8686
_ => {
8787
if full_url {
@@ -92,7 +92,7 @@ fn encode_inner(s: &str, full_url: bool) -> ~str {
9292
// sub-delims:
9393
'!' | '$' | '&' | '"' | '(' | ')' | '*' |
9494
'+' | ',' | ';' | '=' => {
95-
str::push_char(&mut out, ch);
95+
out.push_char(ch);
9696
}
9797

9898
_ => out += fmt!("%%%X", ch as uint)
@@ -148,18 +148,18 @@ fn decode_inner(s: &str, full_url: bool) -> ~str {
148148
// sub-delims:
149149
'!' | '$' | '&' | '"' | '(' | ')' | '*' |
150150
'+' | ',' | ';' | '=' => {
151-
str::push_char(&mut out, '%');
152-
str::push_char(&mut out, bytes[0u] as char);
153-
str::push_char(&mut out, bytes[1u] as char);
151+
out.push_char('%');
152+
out.push_char(bytes[0u] as char);
153+
out.push_char(bytes[1u] as char);
154154
}
155155

156-
ch => str::push_char(&mut out, ch)
156+
ch => out.push_char(ch)
157157
}
158158
} else {
159-
str::push_char(&mut out, ch);
159+
out.push_char(ch);
160160
}
161161
}
162-
ch => str::push_char(&mut out, ch)
162+
ch => out.push_char(ch)
163163
}
164164
}
165165

@@ -191,9 +191,9 @@ fn encode_plus(s: &str) -> ~str {
191191
let ch = rdr.read_byte() as char;
192192
match ch {
193193
'A' .. 'Z' | 'a' .. 'z' | '0' .. '9' | '_' | '.' | '-' => {
194-
str::push_char(&mut out, ch);
194+
out.push_char(ch);
195195
}
196-
' ' => str::push_char(&mut out, '+'),
196+
' ' => out.push_char('+'),
197197
_ => out += fmt!("%%%X", ch as uint)
198198
}
199199
}
@@ -216,7 +216,7 @@ pub fn encode_form_urlencoded(m: &HashMap<~str, ~[~str]>) -> ~str {
216216
if first {
217217
first = false;
218218
} else {
219-
str::push_char(&mut out, '&');
219+
out.push_char('&');
220220
first = false;
221221
}
222222

@@ -267,9 +267,9 @@ pub fn decode_form_urlencoded(s: &[u8]) -> HashMap<~str, ~[~str]> {
267267
};
268268

269269
if parsing_key {
270-
str::push_char(&mut key, ch)
270+
key.push_char(ch)
271271
} else {
272-
str::push_char(&mut value, ch)
272+
value.push_char(ch)
273273
}
274274
}
275275
}

branches/snap-stage3/src/libextra/rope.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1289,9 +1289,7 @@ mod tests {
12891289
fn aux(str: &mut ~str, node: @node::Node) {
12901290
match (*node) {
12911291
node::Leaf(x) => {
1292-
str::push_str(
1293-
str,
1294-
x.content.slice(x.byte_offset, x.byte_offset + x.byte_len));
1292+
str.push_str(x.content.slice(x.byte_offset, x.byte_offset + x.byte_len));
12951293
}
12961294
node::Concat(ref x) => {
12971295
aux(str, x.left);

branches/snap-stage3/src/libextra/semver.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ fn take_nonempty_prefix(rdr: @io::Reader,
149149
let mut buf = ~"";
150150
let mut ch = ch;
151151
while pred(ch) {
152-
str::push_char(&mut buf, ch);
152+
buf.push_char(ch);
153153
ch = rdr.read_char();
154154
}
155155
if buf.is_empty() {

branches/snap-stage3/src/libextra/time.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -851,7 +851,7 @@ priv fn do_strftime(format: &str, tm: &Tm) -> ~str {
851851
while !rdr.eof() {
852852
match rdr.read_char() {
853853
'%' => buf += parse_type(rdr.read_char(), tm),
854-
ch => str::push_char(&mut buf, ch)
854+
ch => buf.push_char(ch)
855855
}
856856
}
857857
}

branches/snap-stage3/src/librustc/middle/astencode.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -980,7 +980,7 @@ impl ebml_decoder_decoder_helpers for reader::Decoder {
980980
fn type_string(doc: ebml::Doc) -> ~str {
981981
let mut str = ~"";
982982
for uint::range(doc.start, doc.end) |i| {
983-
str::push_char(&mut str, doc.data[i] as char);
983+
str.push_char(doc.data[i] as char);
984984
}
985985
str
986986
}

branches/snap-stage3/src/librustc/middle/borrowck/mod.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -694,9 +694,9 @@ impl BorrowckCtxt {
694694
out: &mut ~str) {
695695
match *loan_path {
696696
LpExtend(_, _, LpDeref) => {
697-
str::push_char(out, '(');
697+
out.push_char('(');
698698
self.append_loan_path_to_str(loan_path, out);
699-
str::push_char(out, ')');
699+
out.push_char(')');
700700
}
701701
LpExtend(_, _, LpInterior(_)) |
702702
LpVar(_) => {
@@ -712,7 +712,7 @@ impl BorrowckCtxt {
712712
LpVar(id) => {
713713
match self.tcx.items.find(&id) {
714714
Some(&ast_map::node_local(ref ident)) => {
715-
str::push_str(out, *token::ident_to_str(ident));
715+
out.push_str(*token::ident_to_str(ident));
716716
}
717717
r => {
718718
self.tcx.sess.bug(
@@ -726,23 +726,23 @@ impl BorrowckCtxt {
726726
self.append_loan_path_to_str_from_interior(lp_base, out);
727727
match fname {
728728
mc::NamedField(ref fname) => {
729-
str::push_char(out, '.');
730-
str::push_str(out, *token::ident_to_str(fname));
729+
out.push_char('.');
730+
out.push_str(*token::ident_to_str(fname));
731731
}
732732
mc::PositionalField(idx) => {
733-
str::push_char(out, '#'); // invent a notation here
734-
str::push_str(out, idx.to_str());
733+
out.push_char('#'); // invent a notation here
734+
out.push_str(idx.to_str());
735735
}
736736
}
737737
}
738738

739739
LpExtend(lp_base, _, LpInterior(mc::InteriorElement(_))) => {
740740
self.append_loan_path_to_str_from_interior(lp_base, out);
741-
str::push_str(out, "[]");
741+
out.push_str("[]");
742742
}
743743

744744
LpExtend(lp_base, _, LpDeref) => {
745-
str::push_char(out, '*');
745+
out.push_char('*');
746746
self.append_loan_path_to_str(lp_base, out);
747747
}
748748
}

branches/snap-stage3/src/librustc/middle/dataflow.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -947,13 +947,13 @@ fn bits_to_str(words: &[uint]) -> ~str {
947947
for words.each |&word| {
948948
let mut v = word;
949949
for uint::range(0, uint::bytes) |_| {
950-
str::push_char(&mut result, sep);
951-
str::push_str(&mut result, fmt!("%02x", v & 0xFF));
950+
result.push_char(sep);
951+
result.push_str(fmt!("%02x", v & 0xFF));
952952
v >>= 8;
953953
sep = '-';
954954
}
955955
}
956-
str::push_char(&mut result, ']');
956+
result.push_char(']');
957957
return result;
958958
}
959959

0 commit comments

Comments
 (0)