feat(nonfungibles): add pallet-api/nonfungibles
#2391
clippy
1 error, 50 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 1 |
Warning | 50 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.84.0 (9fc6b4312 2025-01-07)
- cargo 1.84.0 (66221abde 2024-11-19)
- clippy 0.1.84 (9fc6b43126 2025-01-07)
Annotations
Check failure on line 594 in pallets/api/src/nonfungibles/mod.rs
github-actions / clippy
no function or associated item named `check_approval` found for struct `pallet_nfts::Pallet` in the current scope
error[E0599]: no function or associated item named `check_approval` found for struct `pallet_nfts::Pallet` in the current scope
--> pallets/api/src/nonfungibles/mod.rs:594:19
|
594 | NftsOf::<T>::check_approval(&collection, &item, &owner, &operator).is_ok(),
| ^^^^^^^^^^^^^^ function or associated item not found in `Pallet<T, <T as Config>::NftsInstance>`
|
help: there is an associated function `check_approval_permission` with a similar name
|
594 | NftsOf::<T>::check_approval_permission(&collection, &item, &owner, &operator).is_ok(),
| ~~~~~~~~~~~~~~~~~~~~~~~~~
Check warning on line 560 in pallets/nfts/src/types.rs
github-actions / clippy
missing documentation for a struct
warning: missing documentation for a struct
--> pallets/nfts/src/types.rs:560:1
|
560 | pub struct PreSignedAttributes<CollectionId, ItemId, AccountId, Deadline> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Check warning on line 542 in pallets/nfts/src/types.rs
github-actions / clippy
missing documentation for a struct
warning: missing documentation for a struct
--> pallets/nfts/src/types.rs:542:1
|
542 | pub struct PreSignedMint<CollectionId, ItemId, AccountId, Deadline, Balance> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Check warning on line 534 in pallets/nfts/src/types.rs
github-actions / clippy
missing documentation for an associated function
warning: missing documentation for an associated function
--> pallets/nfts/src/types.rs:534:2
|
534 | pub fn max_roles() -> u8 {
| ^^^^^^^^^^^^^^^^^^^^^^^^
Check warning on line 530 in pallets/nfts/src/types.rs
github-actions / clippy
missing documentation for a method
warning: missing documentation for a method
--> pallets/nfts/src/types.rs:530:2
|
530 | pub fn add_role(&mut self, role: CollectionRole) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Check warning on line 526 in pallets/nfts/src/types.rs
github-actions / clippy
missing documentation for a method
warning: missing documentation for a method
--> pallets/nfts/src/types.rs:526:2
|
526 | pub fn has_role(&self, role: CollectionRole) -> bool {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Check warning on line 522 in pallets/nfts/src/types.rs
github-actions / clippy
missing documentation for an associated function
warning: missing documentation for an associated function
--> pallets/nfts/src/types.rs:522:2
|
522 | pub fn none() -> Self {
| ^^^^^^^^^^^^^^^^^^^^^
Check warning on line 465 in pallets/nfts/src/types.rs
github-actions / clippy
missing documentation for a method
warning: missing documentation for a method
--> pallets/nfts/src/types.rs:465:2
|
465 | pub fn disable_setting(&mut self, setting: ItemSetting) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Check warning on line 461 in pallets/nfts/src/types.rs
github-actions / clippy
missing documentation for a method
warning: missing documentation for a method
--> pallets/nfts/src/types.rs:461:2
|
461 | pub fn enable_setting(&mut self, setting: ItemSetting) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Check warning on line 457 in pallets/nfts/src/types.rs
github-actions / clippy
missing documentation for a method
warning: missing documentation for a method
--> pallets/nfts/src/types.rs:457:2
|
457 | pub fn has_disabled_settings(&self) -> bool {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Check warning on line 453 in pallets/nfts/src/types.rs
github-actions / clippy
missing documentation for a method
warning: missing documentation for a method
--> pallets/nfts/src/types.rs:453:2
|
453 | pub fn has_disabled_setting(&self, setting: ItemSetting) -> bool {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Check warning on line 449 in pallets/nfts/src/types.rs
github-actions / clippy
missing documentation for a method
warning: missing documentation for a method
--> pallets/nfts/src/types.rs:449:2
|
449 | pub fn is_setting_enabled(&self, setting: ItemSetting) -> bool {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Check warning on line 432 in pallets/nfts/src/types.rs
github-actions / clippy
missing documentation for an associated function
warning: missing documentation for an associated function
--> pallets/nfts/src/types.rs:432:2
|
432 | pub fn from_disabled(settings: BitFlags<ItemSetting>) -> Self {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Check warning on line 428 in pallets/nfts/src/types.rs
github-actions / clippy
missing documentation for a method
warning: missing documentation for a method
--> pallets/nfts/src/types.rs:428:2
|
428 | pub fn is_disabled(&self, setting: ItemSetting) -> bool {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Check warning on line 424 in pallets/nfts/src/types.rs
github-actions / clippy
missing documentation for a method
warning: missing documentation for a method
--> pallets/nfts/src/types.rs:424:2
|
424 | pub fn get_disabled(&self) -> BitFlags<ItemSetting> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Check warning on line 420 in pallets/nfts/src/types.rs
github-actions / clippy
missing documentation for an associated function
warning: missing documentation for an associated function
--> pallets/nfts/src/types.rs:420:2
|
420 | pub fn all_enabled() -> Self {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Check warning on line 397 in pallets/nfts/src/types.rs
github-actions / clippy
missing documentation for a method
warning: missing documentation for a method
--> pallets/nfts/src/types.rs:397:2
|
397 | pub fn disable_setting(&mut self, setting: CollectionSetting) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Check warning on line 393 in pallets/nfts/src/types.rs
github-actions / clippy
missing documentation for a method
warning: missing documentation for a method
--> pallets/nfts/src/types.rs:393:2
|
393 | pub fn enable_setting(&mut self, setting: CollectionSetting) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Check warning on line 289 in pallets/nfts/src/types.rs
github-actions / clippy
missing documentation for a method
warning: missing documentation for a method
--> pallets/nfts/src/types.rs:289:2
|
289 | pub fn is_disabled(&self, setting: CollectionSetting) -> bool {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Check warning on line 285 in pallets/nfts/src/types.rs
github-actions / clippy
missing documentation for a method
warning: missing documentation for a method
--> pallets/nfts/src/types.rs:285:2
|
285 | pub fn get_disabled(&self) -> BitFlags<CollectionSetting> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Check warning on line 281 in pallets/nfts/src/types.rs
github-actions / clippy
missing documentation for an associated function
warning: missing documentation for an associated function
--> pallets/nfts/src/types.rs:281:2
|
281 | pub fn all_enabled() -> Self {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Check warning on line 129 in pallets/nfts/src/types.rs
github-actions / clippy
missing documentation for a method
warning: missing documentation for a method
--> pallets/nfts/src/types.rs:129:2
|
129 | pub fn destroy_witness(&self) -> DestroyWitness {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: requested on the command line with `-W missing-docs`
Check warning on line 122 in pallets/nfts/src/features/roles.rs
github-actions / clippy
this `map_or` is redundant
warning: this `map_or` is redundant
--> pallets/nfts/src/features/roles.rs:121:3
|
121 | / CollectionRoleOf::<T, I>::get(collection_id, account_id)
122 | | .map_or(false, |roles| roles.has_role(role))
| |________________________________________________________^ help: use is_some_and instead: `CollectionRoleOf::<T, I>::get(collection_id, account_id).is_some_and(|roles| roles.has_role(role))`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or
Check warning on line 152 in pallets/nfts/src/features/metadata.rs
github-actions / clippy
this `map_or` is redundant
warning: this `map_or` is redundant
--> pallets/nfts/src/features/metadata.rs:151:19
|
151 | let is_locked = Self::get_item_config(&collection, &item)
| _________________________^
152 | | .map_or(false, |c| c.has_disabled_setting(ItemSetting::UnlockedMetadata));
| |_____________________________________________________________________________________^ help: use is_ok_and instead: `Self::get_item_config(&collection, &item).is_ok_and(|c| c.has_disabled_setting(ItemSetting::UnlockedMetadata))`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or
= note: `#[warn(clippy::unnecessary_map_or)]` on by default
Check warning on line 38 in extension/src/lib.rs
github-actions / clippy
missing documentation for a type alias
warning: missing documentation for a type alias
--> extension/src/lib.rs:38:1
|
38 | pub type ContractWeightsOf<T> = <T as pallet_contracts::Config>::WeightInfo;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^