Skip to content

Commit

Permalink
Match integer types as $:ty
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Nov 20, 2024
1 parent b21d9ca commit 0d526bd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ const DEC_DIGITS_LUT: &[u8] = b"\
// Adaptation of the original implementation at
// https://github.com/rust-lang/rust/blob/b8214dc6c6fc20d0a660fb5700dca9ebf51ebe89/src/libcore/fmt/num.rs#L188-L266
macro_rules! impl_Integer {
($($max_len:expr => $t:ident),* as $conv_fn:ident) => {$(
($($max_len:expr => $t:ty),* as $conv_fn:ty) => {$(
impl Integer for $t {
const MAX_STR_LEN: usize = $max_len;
}
Expand Down Expand Up @@ -246,7 +246,7 @@ impl_Integer!(I32_MAX_LEN => isize, U32_MAX_LEN => usize as u32);
impl_Integer!(I64_MAX_LEN => isize, U64_MAX_LEN => usize as u64);

macro_rules! impl_Integer128 {
($($max_len:expr => $t:ident),*) => {$(
($($max_len:expr => $t:ty),*) => {$(
impl Integer for $t {
const MAX_STR_LEN: usize = $max_len;
}
Expand Down

0 comments on commit 0d526bd

Please sign in to comment.