From ee22e26594b99b04fbd3ab56cf677fdfa74ea42a Mon Sep 17 00:00:00 2001 From: alexmoon Date: Thu, 14 Jul 2022 16:03:01 -0400 Subject: Disable "associated function is never used" warnings in macro generated impl blocks. --- nrf-softdevice-macro/src/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nrf-softdevice-macro/src/lib.rs b/nrf-softdevice-macro/src/lib.rs index 3b71c6d..cf324e1 100644 --- a/nrf-softdevice-macro/src/lib.rs +++ b/nrf-softdevice-macro/src/lib.rs @@ -381,6 +381,7 @@ pub fn gatt_service(args: TokenStream, item: TokenStream) -> TokenStream { let result = quote! { #struc + #[allow(unused)] impl #struct_name { #struct_vis fn new(sd: &mut ::nrf_softdevice::Softdevice) -> Result { @@ -407,7 +408,7 @@ pub fn gatt_service(args: TokenStream, item: TokenStream) -> TokenStream { } } - #[allow(dead_code)] + #[allow(unused)] #struc_vis enum #event_enum_name { #code_event_enum } @@ -624,6 +625,7 @@ pub fn gatt_client(args: TokenStream, item: TokenStream) -> TokenStream { let result = quote! { #struc + #[allow(unused)] impl #struct_name { #code_impl } -- cgit v1.2.3