-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Correct char.encode_utf16() documentation #31831
Conversation
The "A buffer that's too small" example was calling encode_utf8().
Oh actually I think that this example will fail in this updated case, a 2-element buffer is enough to encode any character in utf-16, so could you change it to a one-element buffer? |
Gah, thank you for this. Agree with @alexcrichton 's suggestion. |
The example still succeeds (at returning Do you mean changing both examples to use a different char that requires two |
Ah yeah I wasn't sure if |
I have changed both examples to use The build failure seems unrelated. (Do I need to comment after adding commits?) |
Yeah, GitHub doesn't notify us when you push :( (I'll restart Travis just in case) |
The "A buffer that's too small" example was calling encode_utf**8**().
The "A buffer that's too small" example was calling encode_utf8().