Skip to content

Commit

Permalink
Correct char.encode_utf16() documentation
Browse files Browse the repository at this point in the history
The "A buffer that's too small" example was calling encode_utf8().
  • Loading branch information
tormol committed Feb 23, 2016
1 parent c8fc481 commit 60ce31a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/librustc_unicode/char.rs
Expand Up @@ -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);
/// ```
Expand Down

0 comments on commit 60ce31a

Please sign in to comment.