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

Merged
merged 16 commits into from
Nov 18, 2024
Merged

chore(sdk): Define MaybeSerde #12577

merged 16 commits into from
Nov 18, 2024

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 requested a review from mattsse November 17, 2024 13:33
@emhane emhane enabled auto-merge November 17, 2024 13:46
@emhane emhane changed the title chore(sdk): Define MaybeSerialize chore(sdk): Define MaybeSerde Nov 17, 2024
@mattsse mattsse force-pushed the emhane/maybe-serialize branch from 4a0cdad to 6814746 Compare November 18, 2024 13:12
@emhane emhane added this pull request to the merge queue Nov 18, 2024
Merged via the queue into main with commit ff22c8e Nov 18, 2024
41 checks passed
@emhane emhane deleted the emhane/maybe-serialize branch November 18, 2024 14:02
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