@@ -530,7 +530,7 @@ mod tests {
530
530
}
531
531
532
532
struct Noncopy {
533
- string : ~ str ,
533
+ string : StrBuf ,
534
534
array : Vec < int > ,
535
535
}
536
536
@@ -539,7 +539,7 @@ mod tests {
539
539
let arena = TypedArena :: new ( ) ;
540
540
for _ in range ( 0 , 100000 ) {
541
541
arena. alloc ( Noncopy {
542
- string : "hello world" . to_owned ( ) ,
542
+ string : "hello world" . to_strbuf ( ) ,
543
543
array : vec ! ( 1 , 2 , 3 , 4 , 5 ) ,
544
544
} ) ;
545
545
}
@@ -550,7 +550,7 @@ mod tests {
550
550
let arena = TypedArena :: new ( ) ;
551
551
b. iter ( || {
552
552
arena. alloc ( Noncopy {
553
- string : "hello world" . to_owned ( ) ,
553
+ string : "hello world" . to_strbuf ( ) ,
554
554
array : vec ! ( 1 , 2 , 3 , 4 , 5 ) ,
555
555
} )
556
556
} )
@@ -560,7 +560,7 @@ mod tests {
560
560
pub fn bench_noncopy_nonarena ( b : & mut Bencher ) {
561
561
b. iter ( || {
562
562
box Noncopy {
563
- string : "hello world" . to_owned ( ) ,
563
+ string : "hello world" . to_strbuf ( ) ,
564
564
array : vec ! ( 1 , 2 , 3 , 4 , 5 ) ,
565
565
}
566
566
} )
@@ -571,7 +571,7 @@ mod tests {
571
571
let arena = Arena :: new ( ) ;
572
572
b. iter ( || {
573
573
arena. alloc ( || Noncopy {
574
- string : "hello world" . to_owned ( ) ,
574
+ string : "hello world" . to_strbuf ( ) ,
575
575
array : vec ! ( 1 , 2 , 3 , 4 , 5 ) ,
576
576
} )
577
577
} )
0 commit comments