about summary refs log tree commit diff
path: root/library/core/src/escape.rs
diff options
context:
space:
mode:
Diffstat (limited to 'library/core/src/escape.rs')
-rw-r--r--library/core/src/escape.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/core/src/escape.rs b/library/core/src/escape.rs
index f6ec30b9f79..b213cc2b916 100644
--- a/library/core/src/escape.rs
+++ b/library/core/src/escape.rs
@@ -60,7 +60,7 @@ const fn escape_ascii<const N: usize>(byte: u8) -> ([ascii::Char; N], Range<u8>)
 const fn escape_unicode<const N: usize>(c: char) -> ([ascii::Char; N], Range<u8>) {
     const { assert!(N >= 10 && N < u8::MAX as usize) };
 
-    let c = u32::from(c);
+    let c = c as u32;
 
     // OR-ing `1` ensures that for `c == 0` the code computes that
     // one digit should be printed.