Skip to content

Conversation

Riateche
Copy link
Contributor

Pre-commit config in CI previously used clippy --fix, which makes -D warnings have no effect. Now warnings should be properly denied. I fixed the simple warnings and added allow annonations for more complex cases.

Copy link

vercel bot commented Nov 11, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
api-reference ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 11, 2024 3:38pm
proposals ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 11, 2024 3:38pm
staking ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 11, 2024 3:38pm
2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
component-library ⬜️ Ignored (Inspect) Nov 11, 2024 3:38pm
insights ⬜️ Ignored (Inspect) Visit Preview Nov 11, 2024 3:38pm

Comment on lines -43 to -45
let sequence: u64 = sequence
.try_into()
.map_err(|_| RestError::InvalidSequenceNumber)?;
Copy link
Contributor

Choose a reason for hiding this comment

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

Are you sure the intention here was not to check if try_into() has some errors?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sequence is already a u64 so try_into() never fails.

@@ -1,3 +1,5 @@
#![allow(clippy::vec_init_then_push)]
Copy link
Collaborator

@ali-behjati ali-behjati Nov 11, 2024

Choose a reason for hiding this comment

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

couldn't we move this in? (i mean just fix it perhaps)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The module contains auto generated code so I feel like it's more convenient to keep this outside so it's easier to update the code if needed.

@Riateche Riateche merged commit 1e692e1 into main Nov 12, 2024
13 checks passed
@Riateche Riateche deleted the fix-ci-clippy branch November 12, 2024 10:34
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.

3 participants