Skip to content

Commit a9de819

Browse files
committed
---
yaml --- r: 34774 b: refs/heads/master c: ebce097 h: refs/heads/master v: v3
1 parent e78d902 commit a9de819

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 7f12cc4e63657155f54fd734c791f66f5f6d9e20
2+
refs/heads/master: ebce09702f04640a545a41323f2d4a34c0023f9e
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: eb8fd119c65c67f3b1b8268cc7341c22d39b7b61
55
refs/heads/try: d324a424d8f84b1eb049b12cf34182bda91b0024

trunk/src/libcore/str.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1473,6 +1473,11 @@ pub pure fn from_utf16(v: &[u16]) -> ~str {
14731473
move buf
14741474
}
14751475

1476+
pub pure fn with_capacity(capacity: uint) -> ~str {
1477+
let mut buf = ~"";
1478+
unsafe { reserve(&mut buf, capacity); }
1479+
move buf
1480+
}
14761481

14771482
/**
14781483
* As char_len but for a slice of a string

0 commit comments

Comments
 (0)