Correct char.encode_utf16() documentation
The "A buffer that's too small" example was calling encode_utf8().
This commit is contained in:
parent
c8fc4817dc
commit
60ce31a00c
@ -476,7 +476,7 @@ impl char {
|
||||
///
|
||||
/// let mut b = [0; 0];
|
||||
///
|
||||
/// let result = 'ß'.encode_utf8(&mut b);
|
||||
/// let result = 'ß'.encode_utf16(&mut b);
|
||||
///
|
||||
/// assert_eq!(result, None);
|
||||
/// ```
|
||||
|
Loading…
Reference in New Issue
Block a user