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(consensus): blanket impl of BlockHeader for deref #1411

Closed
wants to merge 2 commits into from

Conversation

emhane
Copy link
Contributor

@emhane emhane commented Oct 2, 2024

Motivation

Simplifies plugging in a new type that derefs to an existing type that impl trait BlockHeader

Solution

Add blanket impl of BlockHeader for all types that deref to a type that impl BlockHeader

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

@emhane emhane added the debt Tech debt which needs to be addressed label Oct 2, 2024
Copy link
Contributor

@Rjected Rjected left a comment

Choose a reason for hiding this comment

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

is this behavior not covered by deref coercion?

@emhane emhane closed this Oct 3, 2024
@emhane
Copy link
Contributor Author

emhane commented Oct 3, 2024

is this behavior not covered by deref coercion?

when you call a trait method yes, but not when you use it as param or function return type, if I'm not mistaken

@emhane emhane deleted the emhane/block-header branch October 3, 2024 23:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
debt Tech debt which needs to be addressed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants