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

Remove a few casts #194

Merged
merged 1 commit into from
Aug 6, 2024
Merged

Remove a few casts #194

merged 1 commit into from
Aug 6, 2024

Conversation

tcharding
Copy link
Member

@tcharding tcharding commented Jul 31, 2024

In an effort to be more readable use usize::from instead of a cast. There are a few casts left but this all the ones that can use From.

Refactor only, no logic changes.

Close #181

Copy link
Member

@clarkmoody clarkmoody left a comment

Choose a reason for hiding this comment

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

ACK abac5fd

::from is much better

@tcharding
Copy link
Member Author

Force push is rebase only, will still need another one once #192 merges.

In an effort to be more readable use `usize::from` instead of a cast.
There are a few casts left but this all the ones that can use `From`.

Refactor only, no logic changes.

Close rust-bitcoin#181
@tcharding
Copy link
Member Author

Rebase only, no code changes.

@tcharding tcharding marked this pull request as ready for review August 6, 2024 22:33
Copy link
Member

@apoelstra apoelstra left a comment

Choose a reason for hiding this comment

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

ACK 300efbb successfully ran local tests

@apoelstra apoelstra merged commit aa9de8f into rust-bitcoin:master Aug 6, 2024
12 checks passed
@apoelstra apoelstra deleted the 07-31-casts branch August 6, 2024 23:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Usage of cast when From is available
3 participants