Rename main codec to reth db codec (#9501)

This commit is contained in:
Pelle
2024-07-16 09:33:56 +00:00
committed by GitHub
parent 5ef3803dd3
commit 484dc916c1
31 changed files with 77 additions and 77 deletions

View File

@ -33,12 +33,12 @@ pub fn derive_zstd(input: TokenStream) -> TokenStream {
/// If you prefer to manually implement the arbitrary traits, you can still use the [`add_arbitrary_tests()`] function to add arbitrary fuzz tests.
///
/// Example usage:
/// * `#[main_codec(rlp)]`: will implement `derive_arbitrary(rlp)` or `derive_arbitrary(compact, rlp)`, if `compact` is the `main_codec`.
/// * `#[main_codec(no_arbitrary)]`: will skip `derive_arbitrary` (both trait implementations and tests)
/// * `#[reth_codec(rlp)]`: will implement `derive_arbitrary(rlp)` or `derive_arbitrary(compact, rlp)`, if `compact` is the `reth_codec`.
/// * `#[reth_codec(no_arbitrary)]`: will skip `derive_arbitrary` (both trait implementations and tests)
#[proc_macro_attribute]
#[rustfmt::skip]
#[allow(unreachable_code)]
pub fn main_codec(args: TokenStream, input: TokenStream) -> TokenStream {
pub fn reth_codec(args: TokenStream, input: TokenStream) -> TokenStream {
let ast = parse_macro_input!(input as DeriveInput);
let with_zstd = args.clone().into_iter().any(|tk| tk.to_string() == "zstd");