lifthrasiir / rust-encoding

Character encoding support for Rust
MIT License
284 stars 59 forks source link

Stop adding the old length to expected when reserving String space. #103

Closed hsivonen closed 8 years ago

hsivonen commented 8 years ago

The String::reserve() method takes the number of additional bytes not including the bytes that the string already holds.

hsivonen commented 8 years ago

(Again MIT/Apache dual-licensed, so does not cause complications with issue #93.)

lifthrasiir commented 8 years ago

Oh, good observation. It is probably a takeover from good ol' days when there were String::reserve (today's String::reserve_exact) and String::reserve_additional (today's String::reserve).