Skip to content

Commit

Permalink
chore: rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
chungquantin committed Dec 27, 2024
1 parent feac843 commit 5075c02
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions runtime/devnet/src/config/assets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ parameter_types! {

#[derive(Debug)]
#[cfg_attr(feature = "std", derive(PartialEq, Clone))]
struct KeyLimit<const N: u32>;
pub struct KeyLimit<const N: u32>;

Check warning on line 46 in runtime/devnet/src/config/assets.rs

View workflow job for this annotation

GitHub Actions / clippy

missing documentation for a struct

warning: missing documentation for a struct --> runtime/devnet/src/config/assets.rs:46:1 | 46 | pub struct KeyLimit<const N: u32>; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
impl<const N: u32> Get<u32> for KeyLimit<N> {
fn get() -> u32 {
N
Expand Down Expand Up @@ -146,19 +146,21 @@ mod tests {

#[test]
fn ensure_account_balance_deposit() {
let max_size = pallet_nfts::AccountBalance::<Runtime>::storage_info()
.first()
.and_then(|info| info.max_size)
.unwrap_or_default();
let max_size =
pallet_nfts::AccountBalance::<Runtime, TrustBackedNftsInstance>::storage_info()
.first()
.and_then(|info| info.max_size)
.unwrap_or_default();
assert_eq!(deposit(1, max_size), NftsBalanceDeposit::get());
}

#[test]
fn ensure_collection_approval_deposit() {
let max_size = pallet_nfts::CollectionApprovals::<Runtime>::storage_info()
.first()
.and_then(|info| info.max_size)
.unwrap_or_default();
let max_size =
pallet_nfts::CollectionApprovals::<Runtime, TrustBackedNftsInstance>::storage_info()
.first()
.and_then(|info| info.max_size)
.unwrap_or_default();
assert_eq!(deposit(1, max_size), NftsCollectionApprovalDeposit::get());
}
}

0 comments on commit 5075c02

Please sign in to comment.