diff --git a/crates/storage/codecs/derive/src/compact/flags.rs b/crates/storage/codecs/derive/src/compact/flags.rs index 4133f29b211b..650d97ea8241 100644 --- a/crates/storage/codecs/derive/src/compact/flags.rs +++ b/crates/storage/codecs/derive/src/compact/flags.rs @@ -54,8 +54,8 @@ pub(crate) fn generate_flag_struct( // Generate the flag struct. quote! { - pub use #mod_flags_ident::#flags_ident; + #[allow(non_snake_case)] mod #mod_flags_ident { use bytes::Buf; use modular_bitfield::prelude::*; diff --git a/crates/storage/codecs/derive/src/compact/mod.rs b/crates/storage/codecs/derive/src/compact/mod.rs index e8daacfa2358..6560b9034156 100644 --- a/crates/storage/codecs/derive/src/compact/mod.rs +++ b/crates/storage/codecs/derive/src/compact/mod.rs @@ -207,6 +207,7 @@ mod tests { // Expected output in a TokenStream format. Commas matter! let should_output = quote! { pub use TestStruct_flags::TestStructFlags; + #[allow(non_snake_case)] mod TestStruct_flags { use bytes::Buf; use modular_bitfield::prelude::*; diff --git a/crates/transaction-pool/src/test_utils/mock.rs b/crates/transaction-pool/src/test_utils/mock.rs index 9c76ea2d98b5..78bdd485352f 100644 --- a/crates/transaction-pool/src/test_utils/mock.rs +++ b/crates/transaction-pool/src/test_utils/mock.rs @@ -62,25 +62,21 @@ macro_rules! get_value { // Generates all setters and getters macro_rules! make_setters_getters { ($($name:ident => $t:ty);*) => { - paste! { - $( + paste! {$( pub fn [](&mut self, $name: $t) -> &mut Self { set_value!(self => $name); self } - pub fn [](mut self, $name: $t) -> Self { + pub fn [](mut self, $name: $t) -> Self { set_value!(self => $name); self } - pub fn [](&self) -> $t { + pub fn [](&self) -> $t { get_value!(self => $name).clone() } - - )* - - } + )*} }; }