@@ -284,7 +284,7 @@ impl writer {
284
284
self . wr_tagged_bytes ( tag_id, & [ v as u8 ] ) ;
285
285
}
286
286
287
- fn wr_tagged_str ( tag_id : uint , v : ~ str ) {
287
+ fn wr_tagged_str ( tag_id : uint , v : & str ) {
288
288
str:: byte_slice ( v, |b| self . wr_tagged_bytes ( tag_id, b) ) ;
289
289
}
290
290
@@ -363,7 +363,7 @@ impl ebml::writer: serialization::serializer {
363
363
fn emit_f32 ( _v : f32 ) { fail ~"Unimplemented : serializing an f32"; }
364
364
fn emit_float ( _v : float ) { fail ~"Unimplemented : serializing a float"; }
365
365
366
- fn emit_str ( v : ~ str ) { self . wr_tagged_str ( es_str as uint , v) }
366
+ fn emit_str ( v : & str ) { self . wr_tagged_str ( es_str as uint , v) }
367
367
368
368
fn emit_enum ( name : ~str , f : fn ( ) ) {
369
369
self . _emit_label ( name) ;
@@ -445,7 +445,7 @@ priv impl ebml_deserializer {
445
445
return r_doc;
446
446
}
447
447
448
- fn push_doc < T : copy > ( d : ebml:: doc , f : fn ( ) -> T ) -> T {
448
+ fn push_doc < T > ( d : ebml:: doc , f : fn ( ) -> T ) -> T {
449
449
let old_parent = self . parent ;
450
450
let old_pos = self . pos ;
451
451
self . parent = d;
@@ -499,13 +499,13 @@ impl ebml_deserializer: serialization::deserializer {
499
499
fn read_str ( ) -> ~str { ebml:: doc_as_str ( self . next_doc ( es_str) ) }
500
500
501
501
// Compound types:
502
- fn read_enum < T : copy > ( name : ~str , f : fn ( ) -> T ) -> T {
502
+ fn read_enum < T > ( name : ~str , f : fn ( ) -> T ) -> T {
503
503
debug ! { "read_enum(%s)" , name} ;
504
504
self . _check_label ( name) ;
505
505
self . push_doc ( self . next_doc ( es_enum) , f)
506
506
}
507
507
508
- fn read_enum_variant < T : copy > ( f : fn ( uint ) -> T ) -> T {
508
+ fn read_enum_variant < T > ( f : fn ( uint ) -> T ) -> T {
509
509
debug ! { "read_enum_variant()" } ;
510
510
let idx = self . _next_uint ( es_enum_vid) ;
511
511
debug ! { " idx=%u" , idx} ;
@@ -514,12 +514,12 @@ impl ebml_deserializer: serialization::deserializer {
514
514
}
515
515
}
516
516
517
- fn read_enum_variant_arg < T : copy > ( idx : uint , f : fn ( ) -> T ) -> T {
517
+ fn read_enum_variant_arg < T > ( idx : uint , f : fn ( ) -> T ) -> T {
518
518
debug ! { "read_enum_variant_arg(idx=%u)" , idx} ;
519
519
f ( )
520
520
}
521
521
522
- fn read_vec < T : copy > ( f : fn ( uint ) -> T ) -> T {
522
+ fn read_vec < T > ( f : fn ( uint ) -> T ) -> T {
523
523
debug ! { "read_vec()" } ;
524
524
do self. push_doc ( self . next_doc ( es_vec) ) {
525
525
let len = self . _next_uint ( es_vec_len) ;
@@ -528,38 +528,38 @@ impl ebml_deserializer: serialization::deserializer {
528
528
}
529
529
}
530
530
531
- fn read_vec_elt < T : copy > ( idx : uint , f : fn ( ) -> T ) -> T {
531
+ fn read_vec_elt < T > ( idx : uint , f : fn ( ) -> T ) -> T {
532
532
debug ! { "read_vec_elt(idx=%u)" , idx} ;
533
533
self . push_doc ( self . next_doc ( es_vec_elt) , f)
534
534
}
535
535
536
- fn read_box < T : copy > ( f : fn ( ) -> T ) -> T {
536
+ fn read_box < T > ( f : fn ( ) -> T ) -> T {
537
537
debug ! { "read_box()" } ;
538
538
f ( )
539
539
}
540
540
541
- fn read_uniq < T : copy > ( f : fn ( ) -> T ) -> T {
541
+ fn read_uniq < T > ( f : fn ( ) -> T ) -> T {
542
542
debug ! { "read_uniq()" } ;
543
543
f ( )
544
544
}
545
545
546
- fn read_rec < T : copy > ( f : fn ( ) -> T ) -> T {
546
+ fn read_rec < T > ( f : fn ( ) -> T ) -> T {
547
547
debug ! { "read_rec()" } ;
548
548
f ( )
549
549
}
550
550
551
- fn read_rec_field < T : copy > ( f_name : ~str , f_idx : uint , f : fn ( ) -> T ) -> T {
551
+ fn read_rec_field < T > ( f_name : ~str , f_idx : uint , f : fn ( ) -> T ) -> T {
552
552
debug ! { "read_rec_field(%s, idx=%u)" , f_name, f_idx} ;
553
553
self . _check_label ( f_name) ;
554
554
f ( )
555
555
}
556
556
557
- fn read_tup < T : copy > ( sz : uint , f : fn ( ) -> T ) -> T {
557
+ fn read_tup < T > ( sz : uint , f : fn ( ) -> T ) -> T {
558
558
debug ! { "read_tup(sz=%u)" , sz} ;
559
559
f ( )
560
560
}
561
561
562
- fn read_tup_elt < T : copy > ( idx : uint , f : fn ( ) -> T ) -> T {
562
+ fn read_tup_elt < T > ( idx : uint , f : fn ( ) -> T ) -> T {
563
563
debug ! { "read_tup_elt(idx=%u)" , idx} ;
564
564
f ( )
565
565
}
0 commit comments