summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralexmoon <alex.r.moon@gmail.com>2022-07-14 16:03:01 -0400
committeralexmoon <alex.r.moon@gmail.com>2022-07-14 16:03:01 -0400
commitee22e26594b99b04fbd3ab56cf677fdfa74ea42a (patch)
tree18416303319447aeafa1a2e05d598d3d71dd9025
parent98a31ce672c3113a2c238dc4e2ae9d632e59713a (diff)
downloadnrf-softdevice-ee22e26594b99b04fbd3ab56cf677fdfa74ea42a.zip
Disable "associated function is never used" warnings in macro generated impl blocks.
-rw-r--r--nrf-softdevice-macro/src/lib.rs4
1 files changed, 3 insertions, 1 deletions
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<Self, #ble::gatt_server::RegisterError>
{
@@ -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
}