Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(sdk): Define MaybeSerde #12577

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open

chore(sdk): Define MaybeSerde #12577

wants to merge 14 commits into from

Conversation

emhane
Copy link
Member

@emhane emhane commented Nov 15, 2024

Ref #12575

interfaces nicely with alloy types for which serde serialisation is feature gated

@emhane emhane added C-debt Refactor of code section that is hard to understand or maintain A-sdk Related to reth's use as a library labels Nov 15, 2024
Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense,
could you please double that reth-primitives compiles properly standalone, because on main cargo t fails rn which is kinda weird and I assume this is some weird issue with cfg_attr(test)


/// Helper trait that requires de-/serialize implementation since `serde` feature is enabled.
#[cfg(feature = "serde")]
pub trait MaybeSerialize: serde::Serialize + for<'de> serde::Deserialize<'de> {}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since this is ser + de perhaps we should rename this to MaybeSerde?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the same on main, should be addressed in sep pr

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@emhane emhane changed the title chore(sdk): Define MaybeSerialize chore(sdk): Define MaybeSerde Nov 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-sdk Related to reth's use as a library C-debt Refactor of code section that is hard to understand or maintain
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants