Skip to content

Commit 3cc4a9c

Browse files
committed
---
yaml --- r: 32975 b: refs/heads/dist-snap c: 9ff95e2 h: refs/heads/master i: 32973: 606a1fb 32971: b6505fd 32967: 32cd8bf 32959: bbf5541 v: v3
1 parent 32aacce commit 3cc4a9c

File tree

7 files changed

+21
-21
lines changed

7 files changed

+21
-21
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: d0c6ce338884ee21843f4b40bf6bf18d222ce5df
99
refs/heads/incoming: d9317a174e434d4c99fc1a37fd7dc0d2f5328d37
10-
refs/heads/dist-snap: 314805d3aed2f534448e06bc9e4bff6007a0ef35
10+
refs/heads/dist-snap: 9ff95e29b3ae9e3de405680ddb6557da72cc25f7
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/dist-snap/src/libstd/ebml.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ impl Writer {
292292
self.writer.write(b);
293293
}
294294

295-
fn wr_str(s: ~str) {
295+
fn wr_str(s: &str) {
296296
debug!("Write str: %?", s);
297297
self.writer.write(str::to_bytes(s));
298298
}
@@ -418,7 +418,7 @@ fn ebml_deserializer(d: ebml::Doc) -> EbmlDeserializer {
418418
}
419419

420420
priv impl EbmlDeserializer {
421-
fn _check_label(lbl: ~str) {
421+
fn _check_label(lbl: &str) {
422422
if self.pos < self.parent.end {
423423
let {tag: r_tag, doc: r_doc} =
424424
ebml::doc_at(self.parent.data, self.pos);
@@ -516,7 +516,7 @@ impl EbmlDeserializer: serialization::Deserializer {
516516
fn read_str() -> ~str { ebml::doc_as_str(self.next_doc(EsStr)) }
517517

518518
// Compound types:
519-
fn read_enum<T>(name: ~str, f: fn() -> T) -> T {
519+
fn read_enum<T>(name: &str, f: fn() -> T) -> T {
520520
debug!("read_enum(%s)", name);
521521
self._check_label(name);
522522
self.push_doc(self.next_doc(EsEnum), f)
@@ -565,7 +565,7 @@ impl EbmlDeserializer: serialization::Deserializer {
565565
f()
566566
}
567567

568-
fn read_rec_field<T>(f_name: ~str, f_idx: uint, f: fn() -> T) -> T {
568+
fn read_rec_field<T>(f_name: &str, f_idx: uint, f: fn() -> T) -> T {
569569
debug!("read_rec_field(%s, idx=%u)", f_name, f_idx);
570570
self._check_label(f_name);
571571
f()

branches/dist-snap/src/libstd/ebml2.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ impl Serializer {
301301
self.writer.write(b);
302302
}
303303

304-
fn wr_str(s: ~str) {
304+
fn wr_str(s: &str) {
305305
debug!("Write str: %?", s);
306306
self.writer.write(str::to_bytes(s));
307307
}
@@ -429,7 +429,7 @@ fn Deserializer(d: Doc) -> Deserializer {
429429
}
430430

431431
priv impl Deserializer {
432-
fn _check_label(lbl: ~str) {
432+
fn _check_label(lbl: &str) {
433433
if self.pos < self.parent.end {
434434
let TaggedDoc { tag: r_tag, doc: r_doc } =
435435
doc_at(self.parent.data, self.pos);
@@ -528,7 +528,7 @@ impl Deserializer: serialization2::Deserializer {
528528
fn read_str(&self) -> ~str { doc_as_str(self.next_doc(EsStr)) }
529529

530530
// Compound types:
531-
fn read_enum<T>(&self, name: ~str, f: fn() -> T) -> T {
531+
fn read_enum<T>(&self, name: &str, f: fn() -> T) -> T {
532532
debug!("read_enum(%s)", name);
533533
self._check_label(name);
534534
self.push_doc(self.next_doc(EsEnum), f)
@@ -577,7 +577,7 @@ impl Deserializer: serialization2::Deserializer {
577577
f()
578578
}
579579

580-
fn read_rec_field<T>(&self, f_name: ~str, f_idx: uint,
580+
fn read_rec_field<T>(&self, f_name: &str, f_idx: uint,
581581
f: fn() -> T) -> T {
582582
debug!("read_rec_field(%s, idx=%u)", f_name, f_idx);
583583
self._check_label(f_name);

branches/dist-snap/src/libstd/json.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ priv impl Parser {
378378
while char::is_whitespace(self.ch) { self.bump(); }
379379
}
380380

381-
fn parse_ident(ident: ~str, +value: Json) -> Result<Json, Error> {
381+
fn parse_ident(ident: &str, +value: Json) -> Result<Json, Error> {
382382
if str::all(ident, |c| c == self.next_char()) {
383383
self.bump();
384384
Ok(move value)
@@ -747,7 +747,7 @@ pub impl Deserializer: serialization2::Deserializer {
747747
}
748748
}
749749

750-
fn read_enum<T>(&self, name: ~str, f: fn() -> T) -> T {
750+
fn read_enum<T>(&self, name: &str, f: fn() -> T) -> T {
751751
debug!("read_enum(%s)", name);
752752
if name != ~"option" { fail ~"only supports the option enum" }
753753
f()
@@ -810,7 +810,7 @@ pub impl Deserializer: serialization2::Deserializer {
810810
value
811811
}
812812

813-
fn read_rec_field<T>(&self, f_name: ~str, f_idx: uint,
813+
fn read_rec_field<T>(&self, f_name: &str, f_idx: uint,
814814
f: fn() -> T) -> T {
815815
debug!("read_rec_field(%s, idx=%u)", f_name, f_idx);
816816
let top = self.peek();
@@ -819,7 +819,7 @@ pub impl Deserializer: serialization2::Deserializer {
819819
// FIXME(#3148) This hint should not be necessary.
820820
let obj: &self/~Object = obj;
821821

822-
match obj.find_ref(&f_name) {
822+
match obj.find_ref(&(f_name.to_unique())) {
823823
None => fail fmt!("no such field: %s", f_name),
824824
Some(json) => {
825825
self.stack.push(json);

branches/dist-snap/src/libstd/par.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ fn map_slices<A: Copy Send, B: Copy Send>(
7272
}
7373

7474
/// A parallel version of map.
75-
pub fn map<A: Copy Send, B: Copy Send>(xs: &[A], f: fn~((&A)) -> B) -> ~[B] {
75+
pub fn map<A: Copy Send, B: Copy Send>(xs: &[A], +f: fn~((&A)) -> B) -> ~[B] {
7676
vec::concat(map_slices(xs, || {
7777
fn~(_base: uint, slice : &[A], copy f) -> ~[B] {
7878
vec::map(slice, |x| f(x))
@@ -82,7 +82,7 @@ pub fn map<A: Copy Send, B: Copy Send>(xs: &[A], f: fn~((&A)) -> B) -> ~[B] {
8282

8383
/// A parallel version of mapi.
8484
pub fn mapi<A: Copy Send, B: Copy Send>(xs: &[A],
85-
f: fn~(uint, (&A)) -> B) -> ~[B] {
85+
+f: fn~(uint, (&A)) -> B) -> ~[B] {
8686
let slices = map_slices(xs, || {
8787
fn~(base: uint, slice : &[A], copy f) -> ~[B] {
8888
vec::mapi(slice, |i, x| {
@@ -119,7 +119,7 @@ pub fn mapi_factory<A: Copy Send, B: Copy Send>(
119119
}
120120

121121
/// Returns true if the function holds for all elements in the vector.
122-
pub fn alli<A: Copy Send>(xs: &[A], f: fn~(uint, (&A)) -> bool) -> bool {
122+
pub fn alli<A: Copy Send>(xs: &[A], +f: fn~(uint, (&A)) -> bool) -> bool {
123123
do vec::all(map_slices(xs, || {
124124
fn~(base: uint, slice : &[A], copy f) -> bool {
125125
vec::alli(slice, |i, x| {
@@ -130,7 +130,7 @@ pub fn alli<A: Copy Send>(xs: &[A], f: fn~(uint, (&A)) -> bool) -> bool {
130130
}
131131

132132
/// Returns true if the function holds for any elements in the vector.
133-
pub fn any<A: Copy Send>(xs: &[A], f: fn~(&(A)) -> bool) -> bool {
133+
pub fn any<A: Copy Send>(xs: &[A], +f: fn~(&(A)) -> bool) -> bool {
134134
do vec::any(map_slices(xs, || {
135135
fn~(_base : uint, slice: &[A], copy f) -> bool {
136136
vec::any(slice, |x| f(x))

branches/dist-snap/src/libstd/serialization.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,15 @@ trait Deserializer {
6363
fn read_float() -> float;
6464

6565
// Compound types:
66-
fn read_enum<T>(name: ~str, f: fn() -> T) -> T;
66+
fn read_enum<T>(name: &str, f: fn() -> T) -> T;
6767
fn read_enum_variant<T>(f: fn(uint) -> T) -> T;
6868
fn read_enum_variant_arg<T>(idx: uint, f: fn() -> T) -> T;
6969
fn read_vec<T>(f: fn(uint) -> T) -> T;
7070
fn read_vec_elt<T>(idx: uint, f: fn() -> T) -> T;
7171
fn read_box<T>(f: fn() -> T) -> T;
7272
fn read_uniq<T>(f: fn() -> T) -> T;
7373
fn read_rec<T>(f: fn() -> T) -> T;
74-
fn read_rec_field<T>(f_name: ~str, f_idx: uint, f: fn() -> T) -> T;
74+
fn read_rec_field<T>(f_name: &str, f_idx: uint, f: fn() -> T) -> T;
7575
fn read_tup<T>(sz: uint, f: fn() -> T) -> T;
7676
fn read_tup_elt<T>(idx: uint, f: fn() -> T) -> T;
7777
}

branches/dist-snap/src/libstd/serialization2.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,15 @@ pub trait Deserializer {
6060
fn read_str(&self) -> ~str;
6161

6262
// Compound types:
63-
fn read_enum<T>(&self, name: ~str, f: fn() -> T) -> T;
63+
fn read_enum<T>(&self, name: &str, f: fn() -> T) -> T;
6464
fn read_enum_variant<T>(&self, f: fn(uint) -> T) -> T;
6565
fn read_enum_variant_arg<T>(&self, idx: uint, f: fn() -> T) -> T;
6666
fn read_vec<T>(&self, f: fn(uint) -> T) -> T;
6767
fn read_vec_elt<T>(&self, idx: uint, f: fn() -> T) -> T;
6868
fn read_box<T>(&self, f: fn() -> T) -> T;
6969
fn read_uniq<T>(&self, f: fn() -> T) -> T;
7070
fn read_rec<T>(&self, f: fn() -> T) -> T;
71-
fn read_rec_field<T>(&self, f_name: ~str, f_idx: uint, f: fn() -> T) -> T;
71+
fn read_rec_field<T>(&self, f_name: &str, f_idx: uint, f: fn() -> T) -> T;
7272
fn read_tup<T>(&self, sz: uint, f: fn() -> T) -> T;
7373
fn read_tup_elt<T>(&self, idx: uint, f: fn() -> T) -> T;
7474
}

0 commit comments

Comments
 (0)