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

async_nats: pull: Use u64 instead of usize for nanoseconds #901

Merged
merged 1 commit into from
Mar 28, 2023

Conversation

MJayat
Copy link
Contributor

@MJayat MJayat commented Mar 28, 2023

usize is too small in 32-bit environments, especially since it is initialized with 30 seconds, i.e. 30_000_000_000 nanoseconds which is already bigger than 2**32.

@Jarema
Copy link
Member

Jarema commented Mar 28, 2023

Thanks, thats a good catch, though PR is not paasing tests, as it need a little more work.

usize is too small in 32-bit environments, especially since it is
initialized with 30 seconds, i.e. 30_000_000_000 nanoseconds which is
already bigger than 2**32.
@MJayat
Copy link
Contributor Author

MJayat commented Mar 28, 2023

The linter was complaining about casts that are now unnecessary. Should be fixed now.

Copy link
Member

@Jarema Jarema left a comment

Choose a reason for hiding this comment

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

LGTM!

Thanks for the contribution!

@Jarema Jarema merged commit d72e47f into nats-io:main Mar 28, 2023
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.

2 participants