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

Don't use slice indexing #164

Merged
merged 11 commits into from
Dec 14, 2024
Merged

Don't use slice indexing #164

merged 11 commits into from
Dec 14, 2024

Conversation

dvdplm
Copy link
Contributor

@dvdplm dvdplm commented Dec 6, 2024

Enable clippy::indexing_slicing lint in all non-test code. Also changes some methods to return Result.

Closes #68

Copy link

codecov bot commented Dec 6, 2024

Codecov Report

Attention: Patch coverage is 85.65217% with 66 lines in your changes missing coverage. Please review.

Project coverage is 93.16%. Comparing base (4c04dcf) to head (ab2c8af).

Files with missing lines Patch % Lines
synedrion/src/cggmp21/interactive_signing.rs 78.14% 33 Missing ⚠️
synedrion/src/cggmp21/entities.rs 0.00% 26 Missing ⚠️
synedrion/src/www02/entities.rs 95.74% 4 Missing ⚠️
synedrion/src/paillier/rsa.rs 71.42% 2 Missing ⚠️
synedrion/src/cggmp21/key_refresh.rs 98.41% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #164      +/-   ##
==========================================
- Coverage   93.44%   93.16%   -0.28%     
==========================================
  Files          34       34              
  Lines        6849     7026     +177     
==========================================
+ Hits         6400     6546     +146     
- Misses        449      480      +31     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dvdplm dvdplm marked this pull request as ready for review December 9, 2024 15:35
@dvdplm dvdplm requested a review from fjarri December 9, 2024 15:35
pub type U2048Mod = MontyForm<{ nlimbs!(2048) }>;
pub type U4096Mod = MontyForm<{ nlimbs!(4096) }>;
// TODO(dp): Suggest crypto-bigint update nlimbs! macro.
pub type U512Mod = MontyForm<{ 512u32.div_ceil(Limb::BITS) as usize }>;
Copy link
Member

Choose a reason for hiding this comment

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

This is not necessary, I pinned Rust version for the clippy CI action, it now runs on 1.81.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We'll soon have to bump to 1.83 yeah? And I run clippy locally and it complains.

Copy link
Member

Choose a reason for hiding this comment

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

I just run it with +1.81

@fjarri fjarri merged commit ce0f7ed into master Dec 14, 2024
9 of 11 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Dec 14, 2024
@fjarri fjarri deleted the dp-clippy-indexing_slicing branch December 14, 2024 01:19
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Check range errors at the protocol level
2 participants