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

felt u64: add conversion to/from usize #272

Merged
merged 1 commit into from
May 9, 2024

Conversation

hackaugusto
Copy link
Contributor

@hackaugusto hackaugusto commented Apr 22, 2024

This commit also:

  • Reorders conversion definitions so that integer types are in
    increasing order
  • Changes the conversions to use .into() instead of as casts, when
    the conversion is infallible. Instead of the cast like as u128 which
    at first sight doesn't guarantee no truncation

This commit also:

- Reorders conversion definitions so that integer types are in
  increasing order
- Changes the conversions to use `.into()` instead of `as` casts, when
  the conversion is infallible. Instead of the cast like `as u128` which
  at first sight doesn't guarantee no truncation
@hackaugusto hackaugusto force-pushed the hacka-usize-conversion branch from 321595b to 87a5810 Compare April 22, 2024 12:49
Copy link
Collaborator

@irakliyk irakliyk left a comment

Choose a reason for hiding this comment

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

Looks good! Thank you!

@irakliyk irakliyk merged commit 3d8288a into facebook:next May 9, 2024
9 checks passed
irakliyk pushed a commit that referenced this pull request May 9, 2024
This commit also:

- Reorders conversion definitions so that integer types are in
  increasing order
- Changes the conversions to use `.into()` instead of `as` casts, when
  the conversion is infallible. Instead of the cast like `as u128` which
  at first sight doesn't guarantee no truncation
irakliyk pushed a commit that referenced this pull request May 9, 2024
This commit also:

- Reorders conversion definitions so that integer types are in
  increasing order
- Changes the conversions to use `.into()` instead of `as` casts, when
  the conversion is infallible. Instead of the cast like `as u128` which
  at first sight doesn't guarantee no truncation
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.

3 participants