Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Aug 8, 2016

Conversation

hsivonen
Copy link
Contributor

@hsivonen hsivonen commented Aug 8, 2016

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

The String::reserve() method takes the number of additional bytes not
including the bytes that the string already holds.
@hsivonen
Copy link
Contributor Author

hsivonen commented Aug 8, 2016

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

@lifthrasiir lifthrasiir merged commit 5356656 into lifthrasiir:master Aug 8, 2016
@lifthrasiir
Copy link
Owner

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants