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