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

[refactor] #3622: Granular clippy lints #3722

Closed

Conversation

appetrosyan
Copy link
Contributor

Description

Drive-by refactoring and experiment with granular linting on a per-crate basis.

Linked issue

Partially addresses #3622

Checklist

  • Ci checks pass
  • Approval of draft ideas
  • Final execution
  • Final review

@github-actions github-actions bot added the iroha2-dev The re-implementation of a BFT hyperledger in RUST label Jul 19, 2023
@appetrosyan appetrosyan changed the title Iroha2 dev [refactor] #3622: Granular clippy lints Jul 19, 2023
@coveralls
Copy link

Pull Request Test Coverage Report for Build 5596484785

  • 14 of 43 (32.56%) changed or added relevant lines in 9 files are covered.
  • 2146 unchanged lines in 45 files lost coverage.
  • Overall coverage decreased (-0.04%) to 59.4%

Changes Missing Coverage Covered Lines Changed/Added Lines %
client/src/lib.rs 0 1 0.0%
client/src/client.rs 1 10 10.0%
client/src/http_default.rs 0 19 0.0%
Files with Coverage Reduction New Missed Lines %
client_cli/src/main.rs 1 0%
cli/src/main.rs 1 0%
core/src/smartcontracts/isi/asset.rs 1 29.79%
core/src/sumeragi/network_topology.rs 1 96.77%
derive_primitives/src/lib.rs 1 0%
macro/derive/src/lib.rs 1 94.59%
wasm_codec/derive/src/lib.rs 1 90.68%
client/src/http_default.rs 2 0%
cli/src/samples.rs 4 0%
cli/derive/src/lib.rs 5 93.14%
Totals Coverage Status
Change from base Build 5423219773: -0.04%
Covered Lines: 19868
Relevant Lines: 33448

💛 - Coveralls

@appetrosyan appetrosyan self-assigned this Jul 19, 2023
/// and/or computing the hash from a raw stream of bytes. **This
/// function cannot check your code for type validity, so this
/// must be enforced by the user**.
pub fn typed<T>(self) -> HashOf<T> {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
pub fn typed<T>(self) -> HashOf<T> {
pub fn typed_unchecked<T>(self) -> HashOf<T> {

can we at least have suffix _unchecked?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If you like.

How about manually_typed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually, this gives me an idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
iroha2-dev The re-implementation of a BFT hyperledger in RUST
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants