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

feat: get rid of lifetime GATs #5478

Merged
merged 7 commits into from
Nov 19, 2023
Merged

feat: get rid of lifetime GATs #5478

merged 7 commits into from
Nov 19, 2023

Conversation

mattsse
Copy link
Collaborator

@mattsse mattsse commented Nov 17, 2023

blocked by #5476

  • no more separate GAT traits
  • no more lifetimes in StateProvider

collapsed GAT traits into the traits that inherited those

@mattsse mattsse changed the title wip:feat: get rid of lifetime GATs feat: get rid of lifetime GATs Nov 18, 2023
@mattsse mattsse marked this pull request as ready for review November 18, 2023 14:02
@mattsse mattsse added the C-debt Refactor of code section that is hard to understand or maintain label Nov 18, 2023
Copy link
Member

@DaniPopes DaniPopes left a comment

Choose a reason for hiding this comment

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

🫡 c8bc881

docs/crates/db.md Outdated Show resolved Hide resolved
docs/crates/db.md Outdated Show resolved Hide resolved
@rkrasiuk rkrasiuk added the A-db Related to the database label Nov 19, 2023
Copy link
Member

@rkrasiuk rkrasiuk left a comment

Choose a reason for hiding this comment

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

end of an era 🫡

Comment on lines +26 to +32
/// Sealed trait to limit the implementors of the Database trait.
pub trait Sealed: Sized {}
#[allow(missing_debug_implementations)]
pub struct Bounds<T>(T);
impl<T> Sealed for Bounds<T> {}

impl<DB: Database> Sealed for &DB {}
impl<DB: Database> Sealed for Arc<DB> {}
impl Sealed for DatabaseEnv {}
impl Sealed for DatabaseMock {}
Copy link
Member

Choose a reason for hiding this comment

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

any good reason to keep this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

just to retain total control, but can be removed imo

@mattsse mattsse added this pull request to the merge queue Nov 19, 2023
Merged via the queue into main with commit aea1140 Nov 19, 2023
25 checks passed
@mattsse mattsse deleted the matt/remove-lifetime-gats branch November 19, 2023 15:29
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-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.

3 participants