Skip to content

Commit

Permalink
chore: remove unnecessary clone()
Browse files Browse the repository at this point in the history
  • Loading branch information
chungquantin committed Jan 21, 2025
1 parent bd14977 commit ac93544
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions pallets/api/src/nonfungibles/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ pub mod pallet {
origin,
collection,
item,
T::Lookup::unlookup(delegate.clone()),
T::Lookup::unlookup(delegate),
)
}

Expand All @@ -364,7 +364,7 @@ pub mod pallet {
origin,
collection,
item,
T::Lookup::unlookup(delegate.clone()),
T::Lookup::unlookup(delegate),
witness,
)
}
Expand All @@ -390,9 +390,9 @@ pub mod pallet {
/// - `to` - Account into which the item will be minted.
/// - `collection` - The collection of the item to mint.
/// - `item` - An identifier of the new item.
/// - `witness_data` - When the mint type is `HolderOf(collection_id)`, then the owned
/// item_id from that collection needs to be provided within the witness data object. If
/// the mint price is set, then it should be additionally confirmed in the `witness_data`.
/// - `witness` - When the mint type is `HolderOf(collection_id)`, then the owned item_id
/// from that collection needs to be provided within the witness data object. If the mint
/// price is set, then it should be additionally confirmed in the `witness`.
#[pallet::call_index(19)]
#[pallet::weight(NftsWeightInfoOf::<T>::mint())]
pub fn mint(
Expand All @@ -403,13 +403,7 @@ pub mod pallet {
witness: MintWitness<ItemIdOf<T>, ItemPriceOf<T>>,
) -> DispatchResult {
let owner = ensure_signed(origin.clone())?;
NftsOf::<T>::mint(
origin,
collection,
item,
T::Lookup::unlookup(to),
Some(witness.clone()),
)?;
NftsOf::<T>::mint(origin, collection, item, T::Lookup::unlookup(to), Some(witness))?;
Self::deposit_event(Event::Transfer { collection, item, from: None, to: Some(owner) });
Ok(())
}
Expand Down

0 comments on commit ac93544

Please sign in to comment.