style: Migrate to stable-only rustfmt configuration
- Remove nightly-only features from .rustfmt.toml and vendor/ss58-registry/rustfmt.toml - Removed features: imports_granularity, wrap_comments, comment_width, reorder_impl_items, spaces_around_ranges, binop_separator, match_arm_blocks, trailing_semicolon, trailing_comma - Format all 898 affected files with stable rustfmt - Ensures long-term reliability without nightly toolchain dependency
This commit is contained in:
@@ -211,9 +211,10 @@ impl<Registry: DerivativesRegistry<NonFungibleAsset, DerivativeId>, DerivativeId
|
||||
{
|
||||
fn matches_instance(asset: &Asset) -> Result<DerivativeId, Error> {
|
||||
match asset.fun {
|
||||
Fungibility::NonFungible(asset_instance) =>
|
||||
Fungibility::NonFungible(asset_instance) => {
|
||||
Registry::get_derivative(&(asset.id.clone(), asset_instance))
|
||||
.map_err(|_| Error::AssetNotHandled),
|
||||
.map_err(|_| Error::AssetNotHandled)
|
||||
},
|
||||
Fungibility::Fungible(_) => Err(Error::AssetNotHandled),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,16 +66,18 @@ impl Update<ChangeOwnerFrom<AccountId>> for PredefinedIdNfts {
|
||||
|
||||
unique_items::ItemOwner::<Test, PredefinedIdNftsInstance>::try_mutate(id, |owner| {
|
||||
match owner {
|
||||
Some(current_owner) =>
|
||||
Some(current_owner) => {
|
||||
if *current_owner == check_owner {
|
||||
*owner = Some(*new_owner);
|
||||
Ok(())
|
||||
} else {
|
||||
Err(unique_items::Error::<Test, PredefinedIdNftsInstance>::NoPermission
|
||||
.into())
|
||||
},
|
||||
None =>
|
||||
Err(unique_items::Error::<Test, PredefinedIdNftsInstance>::UnknownItem.into()),
|
||||
}
|
||||
},
|
||||
None => {
|
||||
Err(unique_items::Error::<Test, PredefinedIdNftsInstance>::UnknownItem.into())
|
||||
},
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -169,7 +169,9 @@ impl ContainsPair<Asset, Location> for TrustAssetsFromSiblings {
|
||||
match (asset_location.unpack(), origin.unpack()) {
|
||||
((1, [Teyrchain(asset_para_id), ..]), (1, [Teyrchain(origin_para_id)]))
|
||||
if asset_para_id == origin_para_id =>
|
||||
true,
|
||||
{
|
||||
true
|
||||
},
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
@@ -210,8 +212,9 @@ pub struct SiblingAssetToReserveLocationConvert;
|
||||
impl ConvertLocation<AccountId> for SiblingAssetToReserveLocationConvert {
|
||||
fn convert_location(location: &Location) -> Option<AccountId> {
|
||||
match location.unpack() {
|
||||
(1, [Teyrchain(para_id), ..]) =>
|
||||
LocationToAccountId::convert_location(&Location::new(1, Teyrchain(*para_id))),
|
||||
(1, [Teyrchain(para_id), ..]) => {
|
||||
LocationToAccountId::convert_location(&Location::new(1, Teyrchain(*para_id)))
|
||||
},
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user