Skip to content

Commit 5efb3ef

Browse files
committed
Update Unicode escapes;
1 parent f5cd2c5 commit 5efb3ef

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

library/core/src/char/methods.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ impl char {
6969
/// assert_eq!(char::from_u32(value_at_max + 1), None);
7070
/// ```
7171
#[stable(feature = "assoc_char_consts", since = "1.52.0")]
72-
pub const MAX: char = '\u{10ffff}';
72+
pub const MAX: char = '\u{10FFFF}';
7373

7474
/// `U+FFFD REPLACEMENT CHARACTER` (�) is used in Unicode to represent a
7575
/// decoding error.
@@ -1837,7 +1837,6 @@ pub const fn encode_utf16_raw(mut code: u32, dst: &mut [u16]) -> &mut [u16] {
18371837
}
18381838
(2, [a, b, ..]) => {
18391839
code -= 0x1_0000;
1840-
18411840
*a = (code >> 10) as u16 | 0xD800;
18421841
*b = (code & 0x3FF) as u16 | 0xDC00;
18431842
}

0 commit comments

Comments
 (0)