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 {