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

[Rust] Normalize mid calculation in case overflow #1363

Merged
merged 6 commits into from
May 18, 2024
Merged

Conversation

rongyi
Copy link
Contributor

@rongyi rongyi commented May 14, 2024

mid is always calculated with i + (j - i) / 2 in other place, so change it!

@rongyi rongyi changed the title Normalize mid calculate in case overflow [Rust] Normalize mid calculation in case overflow May 14, 2024
@krahets
Copy link
Owner

krahets commented May 15, 2024

Could you help also update other languages in this PR?

@rongyi
Copy link
Contributor Author

rongyi commented May 16, 2024

yes! pleasure! will push to here soon

Copy link
Owner

@krahets krahets left a comment

Choose a reason for hiding this comment

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

Thanks for the PR!

@krahets krahets added code Code-related embellishment Decorative detail or feature labels May 18, 2024
@krahets krahets merged commit 21be3fd into krahets:main May 18, 2024
40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code Code-related embellishment Decorative detail or feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants