Skip to content

Commit 62cf95f

Browse files
committed
libarena: Remove all uses of ~str from libarena
1 parent bf249b4 commit 62cf95f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/libarena/lib.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ mod tests {
530530
}
531531

532532
struct Noncopy {
533-
string: ~str,
533+
string: StrBuf,
534534
array: Vec<int> ,
535535
}
536536

@@ -539,7 +539,7 @@ mod tests {
539539
let arena = TypedArena::new();
540540
for _ in range(0, 100000) {
541541
arena.alloc(Noncopy {
542-
string: "hello world".to_owned(),
542+
string: "hello world".to_strbuf(),
543543
array: vec!( 1, 2, 3, 4, 5 ),
544544
});
545545
}
@@ -550,7 +550,7 @@ mod tests {
550550
let arena = TypedArena::new();
551551
b.iter(|| {
552552
arena.alloc(Noncopy {
553-
string: "hello world".to_owned(),
553+
string: "hello world".to_strbuf(),
554554
array: vec!( 1, 2, 3, 4, 5 ),
555555
})
556556
})
@@ -560,7 +560,7 @@ mod tests {
560560
pub fn bench_noncopy_nonarena(b: &mut Bencher) {
561561
b.iter(|| {
562562
box Noncopy {
563-
string: "hello world".to_owned(),
563+
string: "hello world".to_strbuf(),
564564
array: vec!( 1, 2, 3, 4, 5 ),
565565
}
566566
})
@@ -571,7 +571,7 @@ mod tests {
571571
let arena = Arena::new();
572572
b.iter(|| {
573573
arena.alloc(|| Noncopy {
574-
string: "hello world".to_owned(),
574+
string: "hello world".to_strbuf(),
575575
array: vec!( 1, 2, 3, 4, 5 ),
576576
})
577577
})

0 commit comments

Comments
 (0)