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

Use checked maths #51

Merged
merged 4 commits into from
Nov 10, 2023
Merged

Use checked maths #51

merged 4 commits into from
Nov 10, 2023

Conversation

adetaylor
Copy link
Collaborator

This fixes a TODO which was insufficiently detailed, and adds a MSRV.

Fixes #48.

@@ -564,23 +564,33 @@ pub(crate) struct SeekableHttpReader {

impl Seek for SeekableHttpReader {
fn seek(&mut self, pos: std::io::SeekFrom) -> std::io::Result<u64> {
// TODO used checked arithmetic when stabilized
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This TODO actually was in reference to a proposal to allow checked arithmetic between disparate types, e.g. u64 and i64. However using try_into is just as good.

@adetaylor adetaylor marked this pull request as ready for review November 10, 2023 18:16
@adetaylor adetaylor merged commit b5658c0 into main Nov 10, 2023
12 checks passed
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.

Define an MSRV
1 participant