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

Model numbers as usize #27

Merged
merged 2 commits into from
Jul 2, 2024
Merged

Model numbers as usize #27

merged 2 commits into from
Jul 2, 2024

Conversation

marsavar
Copy link
Contributor

@marsavar marsavar commented Jul 2, 2024

What does this change?

Changes the schemas modelling the Github API, specifically turning all i32 into usize.

Why?

An action recently failed with this error:

Caused by:
    invalid value: integer `2152714260`, expected i32 at line 1 column 17

because the ID of the pull request was greater than i32::MAX. Since IDs are generally positive integer numbers, it's fine to switch to an unsigned integer type. Specifically, usize's max value in this case is $2^{64}-1$, compared to i32's $2^{31}-1$, which is quite a lot more.

@marsavar marsavar merged commit 2e77691 into main Jul 2, 2024
2 checks passed
@NovemberTang NovemberTang deleted the ms-id-size branch July 2, 2024 09:07
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