-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Conversation
There was a problem hiding this 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)
crates/primitives-traits/src/lib.rs
Outdated
|
||
/// 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> {} |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MaybeSerialize
MaybeSerde
4a0cdad
to
6814746
Compare
Ref #12575
interfaces nicely with alloy types for which serde serialisation is feature gated