Skip to content

Commit

Permalink
Update Unicode escapes;
Browse files Browse the repository at this point in the history
  • Loading branch information
bjoernager committed Sep 28, 2024
1 parent f5cd2c5 commit 5efb3ef
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions library/core/src/char/methods.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ impl char {
/// assert_eq!(char::from_u32(value_at_max + 1), None);
/// ```
#[stable(feature = "assoc_char_consts", since = "1.52.0")]
pub const MAX: char = '\u{10ffff}';
pub const MAX: char = '\u{10FFFF}';

/// `U+FFFD REPLACEMENT CHARACTER` (�) is used in Unicode to represent a
/// decoding error.
Expand Down Expand Up @@ -1837,7 +1837,6 @@ pub const fn encode_utf16_raw(mut code: u32, dst: &mut [u16]) -> &mut [u16] {
}
(2, [a, b, ..]) => {
code -= 0x1_0000;

*a = (code >> 10) as u16 | 0xD800;
*b = (code & 0x3FF) as u16 | 0xDC00;
}
Expand Down

0 comments on commit 5efb3ef

Please sign in to comment.