Minor tweak in this awful pile of code
This commit is contained in:
parent
62262cb0fe
commit
cd2cf3346f
16
src/lib.rs
16
src/lib.rs
@ -37,21 +37,29 @@ fn derive_protocol(input: proc_macro2::TokenStream) -> proc_macro2::TokenStream
|
||||
|
||||
// TODO: These logs should be filterable in some way
|
||||
#[cfg(feature = "log")]
|
||||
#[allow(unused_variables)]
|
||||
let debug = quote! { log::debug! };
|
||||
#[cfg(feature = "log")]
|
||||
#[allow(unused_variables)]
|
||||
let info = quote! { log::info! };
|
||||
#[cfg(feature = "log")]
|
||||
let _warn = quote! { log::warn! };
|
||||
#[allow(unused_variables)]
|
||||
let warn = quote! { log::warn! };
|
||||
#[cfg(feature = "log")]
|
||||
let _error = quote! { log::error! };
|
||||
#[allow(unused_variables)]
|
||||
let error = quote! { log::error! };
|
||||
#[cfg(not(feature = "log"))]
|
||||
#[allow(unused_variables)]
|
||||
let debug = quote! { eprintln! };
|
||||
#[cfg(not(feature = "log"))]
|
||||
#[allow(unused_variables)]
|
||||
let info = quote! { eprintln! };
|
||||
#[cfg(not(feature = "log"))]
|
||||
let _warn = quote! { eprintln! };
|
||||
#[allow(unused_variables)]
|
||||
let warn = quote! { eprintln! };
|
||||
#[cfg(not(feature = "log"))]
|
||||
let _error = quote! { eprintln! };
|
||||
#[allow(unused_variables)]
|
||||
let error = quote! { eprintln! };
|
||||
|
||||
// Must be on an enum
|
||||
let enum_ = match &input.data {
|
||||
|
Loading…
Reference in New Issue
Block a user