-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
Make str::as_buf less error prone. #3371
Labels
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
Comments
See also #7235 , I expect we'll be overhauling all of this. |
Fixed by #8296. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
as_buf
passes to the callback the length of the string + 1 for the null character. Now that itas_buf
also accepts slices this results in some very confusing behavior (#3365).I suggest we remove the
len
parameter completely. Users that care about the length should capture it and not assume anything about null termination (as_c_str is
for null termination).The text was updated successfully, but these errors were encountered: