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

Add Database helper type: Either #12233

Closed
mattsse opened this issue Oct 31, 2024 · 1 comment · Fixed by #12240
Closed

Add Database helper type: Either #12233

mattsse opened this issue Oct 31, 2024 · 1 comment · Fixed by #12240
Labels
A-db Related to the database C-enhancement New feature or request D-good-first-issue Nice and easy! A great choice to get started

Comments

@mattsse
Copy link
Collaborator

mattsse commented Oct 31, 2024

Describe the feature

under some circumstances it might be useful to use two different Database implementations.
we currently don't have an Either type for this

eventually this should be upstreamed to revm directly, but we can introduce this here first

pub mod database;

TODO

  • add new modules mod either and enum Either that implements Database if both variants implement database.
pub enum Either<L, R> {
    /// A value of type `L`.
    Left(L),
    /// A value of type `R`.
    Right(R),
}

Additional context

No response

@mattsse mattsse added C-enhancement New feature or request S-needs-triage This issue needs to be labelled labels Oct 31, 2024
@mattsse mattsse added D-good-first-issue Nice and easy! A great choice to get started A-db Related to the database and removed S-needs-triage This issue needs to be labelled labels Oct 31, 2024
@Parikalp-Bhardwaj
Copy link
Contributor

Hi @mattsse 🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-db Related to the database C-enhancement New feature or request D-good-first-issue Nice and easy! A great choice to get started
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants