Correct char.encode_utf16() documentation

The "A buffer that's too small" example was calling encode_utf8().
This commit is contained in:
tormol 2016-02-23 05:55:49 +01:00
parent c8fc4817dc
commit 60ce31a00c

View File

@ -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);
/// ```