add some purity annotations in core
This commit is contained in:
parent
c5d168c404
commit
c5f2c1d61e
3 changed files with 72 additions and 75 deletions
|
@ -1619,7 +1619,7 @@ fn reserve_at_least(&s: str, n: uint) unsafe {
|
|||
Returns the number of single-byte characters the string can hold without
|
||||
reallocating
|
||||
"]
|
||||
fn capacity(&&s: str) -> uint unsafe {
|
||||
pure fn capacity(&&s: str) -> uint unsafe {
|
||||
as_bytes(s) {|buf|
|
||||
let vcap = vec::capacity(buf);
|
||||
assert vcap > 0u;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue