Skip to content

Remove unnecessary casts - #5588

Merged
jtraglia merged 3 commits into
ethereum:masterfrom
jtraglia:remove-unnecessary-casts
Sep 2, 2026
Merged

Remove unnecessary casts#5588
jtraglia merged 3 commits into
ethereum:masterfrom
jtraglia:remove-unnecessary-casts

Conversation

@jtraglia

@jtraglia jtraglia commented Sep 2, 2026

Copy link
Copy Markdown
Member

Now that we're using eth-ssz-specs and ty, we can remove a lot of these unnecessary type casts. This is because in eth-ssz-specs, operations return the expected type. I believe this helps readability a lot, because it's simpler.

@jihoonsong jihoonsong left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is nice. Can we also remove Epoch(1) and Slot(1) type casts? There are some more of these.

@jtraglia

jtraglia commented Sep 2, 2026

Copy link
Copy Markdown
Member Author

Thanks @jihoonsong. Fixed those too. This might not be exhaustive, but it's a step in the right direction. Merging.

@jtraglia
jtraglia merged commit 566e1eb into ethereum:master Sep 2, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants