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

fix(nfts): clippy warnings #391

Merged
merged 3 commits into from
Nov 22, 2024
Merged

fix(nfts): clippy warnings #391

merged 3 commits into from
Nov 22, 2024

Conversation

chungquantin
Copy link
Collaborator

Resolve all clippy warnings in the forked pallet-nfts.

@codecov-commenter
Copy link

codecov-commenter commented Nov 21, 2024

Codecov Report

Attention: Patch coverage is 75.00000% with 39 lines in your changes missing coverage. Please review.

Project coverage is 68.41%. Comparing base (aff6408) to head (3e886a9).

Files with missing lines Patch % Lines
pallets/nfts/src/features/attributes.rs 58.82% 0 Missing and 7 partials ⚠️
pallets/nfts/src/impl_nonfungibles.rs 0.00% 6 Missing ⚠️
pallets/nfts/src/features/create_delete_item.rs 88.09% 0 Missing and 5 partials ⚠️
pallets/nfts/src/features/metadata.rs 72.22% 1 Missing and 4 partials ⚠️
pallets/nfts/src/lib.rs 54.54% 4 Missing and 1 partial ⚠️
pallets/nfts/src/features/settings.rs 62.50% 0 Missing and 3 partials ⚠️
pallets/nfts/src/features/approvals.rs 66.66% 0 Missing and 2 partials ⚠️
pallets/nfts/src/features/buy_sell.rs 60.00% 0 Missing and 2 partials ⚠️
pallets/nfts/src/features/transfer.rs 77.77% 0 Missing and 2 partials ⚠️
...lets/nfts/src/features/create_delete_collection.rs 85.71% 0 Missing and 1 partial ⚠️
... and 1 more
@@            Coverage Diff             @@
##             main     #391      +/-   ##
==========================================
+ Coverage   68.38%   68.41%   +0.02%     
==========================================
  Files          70       70              
  Lines       11846    11838       -8     
  Branches    11846    11838       -8     
==========================================
- Hits         8101     8099       -2     
+ Misses       3486     3482       -4     
+ Partials      259      257       -2     
Files with missing lines Coverage Δ
pallets/nfts/src/benchmarking.rs 85.79% <100.00%> (ø)
pallets/nfts/src/common_functions.rs 80.00% <100.00%> (ø)
pallets/nfts/src/features/atomic_swap.rs 90.51% <100.00%> (ø)
pallets/nfts/src/features/lock.rs 90.12% <100.00%> (ø)
pallets/nfts/src/features/roles.rs 96.25% <100.00%> (+0.09%) ⬆️
...lets/nfts/src/features/create_delete_collection.rs 84.33% <85.71%> (ø)
pallets/nfts/src/migration.rs 0.00% <0.00%> (ø)
pallets/nfts/src/features/approvals.rs 93.10% <66.66%> (-0.16%) ⬇️
pallets/nfts/src/features/buy_sell.rs 90.69% <60.00%> (ø)
pallets/nfts/src/features/transfer.rs 83.72% <77.77%> (-0.13%) ⬇️
... and 6 more

🚨 Try these New Features:

Copy link
Collaborator

@Daanvdplas Daanvdplas left a comment

Choose a reason for hiding this comment

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

Thank you! I commented for 3 clippy warnings that can be resolved easily as well. Will approve so that we can progress faster

pallets/nfts/src/features/attributes.rs Show resolved Hide resolved
pallets/nfts/src/features/attributes.rs Show resolved Hide resolved
pallets/nfts/src/impl_nonfungibles.rs Show resolved Hide resolved
Copy link
Collaborator

@evilrobot-01 evilrobot-01 left a comment

Choose a reason for hiding this comment

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

A few missed warnings, probably missed due to all the missing docs warnings. We enable missing docs warnings so that we get a warning for the code we write, to ensure that we have sufficient docs for publicly available functionality.

As I think it unlikely that we will write the missing docs for the forked pallet, I suggest we silence them on a case by case basis, otherwise we will be faced with more noise on each subsequent review to this pallet. Its quick to sort now and will make reviewing much easier, especially due to the scale of this pallet.

pallets/nfts/src/lib.rs Show resolved Hide resolved
pallets/nfts/src/lib.rs Show resolved Hide resolved
pallets/nfts/src/features/metadata.rs Show resolved Hide resolved
Copy link
Collaborator

@evilrobot-01 evilrobot-01 left a comment

Choose a reason for hiding this comment

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

Great, tyvm!

@evilrobot-01 evilrobot-01 merged commit 3476994 into main Nov 22, 2024
13 checks passed
@evilrobot-01 evilrobot-01 deleted the chungquantin/fix-nfts_clippy branch November 22, 2024 10:29
@chungquantin chungquantin linked an issue Nov 29, 2024 that may be closed by this pull request
20 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat(pop-api): nonfungibles use case
4 participants