From 25f9bff97addb66b3c4f6dca791002a000c2e70a Mon Sep 17 00:00:00 2001 From: Maybe Waffle Date: Fri, 26 Aug 2022 20:26:21 +0400 Subject: [PATCH] Remove useless identity conversions --- src/bot_commands.rs | 2 +- src/error.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bot_commands.rs b/src/bot_commands.rs index e8d552c9..85ea4a09 100644 --- a/src/bot_commands.rs +++ b/src/bot_commands.rs @@ -43,7 +43,7 @@ pub(crate) fn bot_commands_impl(input: DeriveInput) -> Result { } }; - Ok(TokenStream::from(trait_impl)) + Ok(trait_impl) } fn impl_commands( diff --git a/src/error.rs b/src/error.rs index db737a1d..e2f98e98 100644 --- a/src/error.rs +++ b/src/error.rs @@ -10,7 +10,7 @@ pub(crate) fn compile_error(data: T) -> Error where T: ToTokens, { - Error(TokenStream::from(quote! { compile_error! { #data } })) + Error(quote! { compile_error! { #data } }) } impl From for proc_macro2::TokenStream {