From 0260e5f52d0ac305d3de42841e37bfc642252d55 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Thu, 22 Aug 2024 15:00:28 -0700 Subject: [PATCH] Combine char's ToTokens impl with numeric primitives --- src/to_tokens.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/to_tokens.rs b/src/to_tokens.rs index 23b6ec2..bbb8696 100644 --- a/src/to_tokens.rs +++ b/src/to_tokens.rs @@ -153,12 +153,8 @@ primitive! { f32 => f32_suffixed f64 => f64_suffixed -} -impl ToTokens for char { - fn to_tokens(&self, tokens: &mut TokenStream) { - tokens.append(Literal::character(*self)); - } + char => character } impl ToTokens for bool {