Skip to content

Commit 2ef751d

Browse files
committed
---
yaml --- r: 15200 b: refs/heads/try c: 5ce3d35 h: refs/heads/master v: v3
1 parent 65c7ec1 commit 2ef751d

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
refs/heads/master: 61b1875c16de39c166b0f4d54bba19f9c6777d1a
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
5-
refs/heads/try: 26630187920a8b3f1b2f2d73f0172addd6c35ccd
5+
refs/heads/try: 5ce3d35f4170ecbf6a0efbc3cd7cdcb451c79837
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

branches/try/src/libstd/arena.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ type chunk = {data: [u8], mut fill: uint};
88
type arena = {mut chunks: list::list<@chunk>};
99

1010
fn chunk(size: uint) -> @chunk {
11-
@{ data: vec::from_elem(size, 0u8), mut fill: 0u }
11+
let mut v = [];
12+
vec::reserve(v, size);
13+
@{ data: v, mut fill: 0u }
1214
}
1315

1416
fn arena_with_size(initial_size: uint) -> arena {

0 commit comments

Comments
 (0)