I have struct
that holds when it's created as BlockNumber
.
#[derive(Encode, Decode, Default, Clone, PartialEq, RuntimeDebug, TypeInfo)]
#[scale_info(skip_type_params(BlockTime, MaxContentLength))]
pub struct Listing<BlockNumber, MaxContentLength: Get<u32>> {
pub is_active: bool,
pub content: Content<MaxContentLength>,
pub created: BlockNumber,
pub updated: Option<BlockNumber>,
}
And I'm trying to set it like this but getting an error saying type argument T
not allowed.
Listings::<T>::insert(
&property,
&who,
Listing {
is_active: is_active.unwrap_or(false),
content,
created: frame_system::<T>::Pallet::current_block_number(),
updated: None,
},
);
error[E0109]: type arguments are not allowed for this type
--> pallets/listing/src/lib.rs:87:30
|
87 | created: frame_system::<T>::Pallet::current_block_number(),
| ^ type argument not allowed
For more information about this error, try `rustc --explain E0109`.
error: could not compile `pallet-listing` due to previous error