We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
From<core::ascii::char>
1 parent 5bd5d21 commit abf45aeCopy full SHA for abf45ae
library/core/src/ascii/ascii_char.rs
@@ -537,6 +537,22 @@ impl AsciiChar {
537
}
538
539
540
+macro_rules! into_int_impl {
541
+ ($($ty:ty)*) => {
542
+ $(
543
+ #[unstable(feature = "ascii_char", issue = "110998")]
544
+ impl From<AsciiChar> for $ty {
545
+ #[inline]
546
+ fn from(chr: AsciiChar) -> $ty {
547
+ chr as u8 as $ty
548
+ }
549
550
+ )*
551
552
+}
553
+
554
+into_int_impl!(u8 u16 u32 u64 u128 char);
555
556
impl [AsciiChar] {
557
/// Views this slice of ASCII characters as a UTF-8 `str`.
558
#[unstable(feature = "ascii_char", issue = "110998")]
0 commit comments