mirror of
https://github.com/logos-blockchain/lez-programs.git
synced 2026-07-03 05:29:50 +00:00
style: fix rustfmt trailing newline and replace unwrap with expect for clippy
This commit is contained in:
parent
16738c7def
commit
029f617737
@ -61,7 +61,12 @@ impl Accounts {
|
||||
name: String::from("Gold"),
|
||||
total_supply: 1_000_000_u128,
|
||||
metadata_id: None,
|
||||
mint_authority: Some(Ids::token_definition().as_ref().try_into().unwrap()),
|
||||
mint_authority: Some(
|
||||
Ids::token_definition()
|
||||
.as_ref()
|
||||
.try_into()
|
||||
.expect("AccountId is always 32 bytes"),
|
||||
),
|
||||
}),
|
||||
nonce: Nonce(0),
|
||||
}
|
||||
@ -75,7 +80,12 @@ impl Accounts {
|
||||
name: String::from("Gold"),
|
||||
total_supply: 1_000_000_u128,
|
||||
metadata_id: None,
|
||||
mint_authority: Some(Ids::token_definition().as_ref().try_into().unwrap()),
|
||||
mint_authority: Some(
|
||||
Ids::token_definition()
|
||||
.as_ref()
|
||||
.try_into()
|
||||
.expect("AccountId is always 32 bytes"),
|
||||
),
|
||||
}),
|
||||
nonce: Nonce(0),
|
||||
}
|
||||
@ -418,7 +428,12 @@ fn token_burn() {
|
||||
name: String::from("Gold"),
|
||||
total_supply: 800_000_u128,
|
||||
metadata_id: None,
|
||||
mint_authority: Some(Ids::token_definition().as_ref().try_into().unwrap()),
|
||||
mint_authority: Some(
|
||||
Ids::token_definition()
|
||||
.as_ref()
|
||||
.try_into()
|
||||
.expect("AccountId is always 32 bytes")
|
||||
),
|
||||
}),
|
||||
nonce: Nonce(0),
|
||||
}
|
||||
@ -468,7 +483,12 @@ fn token_mint() {
|
||||
name: String::from("Gold"),
|
||||
total_supply: 1_500_000_u128,
|
||||
metadata_id: None,
|
||||
mint_authority: Some(Ids::token_definition().as_ref().try_into().unwrap()),
|
||||
mint_authority: Some(
|
||||
Ids::token_definition()
|
||||
.as_ref()
|
||||
.try_into()
|
||||
.expect("AccountId is always 32 bytes")
|
||||
),
|
||||
}),
|
||||
nonce: Nonce(1),
|
||||
}
|
||||
@ -590,7 +610,12 @@ fn token_mint_fresh_authorized_public_recipient() {
|
||||
name: String::from("Gold"),
|
||||
total_supply: 1_500_000_u128,
|
||||
metadata_id: None,
|
||||
mint_authority: Some(Ids::token_definition().as_ref().try_into().unwrap()),
|
||||
mint_authority: Some(
|
||||
Ids::token_definition()
|
||||
.as_ref()
|
||||
.try_into()
|
||||
.expect("AccountId is always 32 bytes")
|
||||
),
|
||||
}),
|
||||
nonce: Nonce(1),
|
||||
}
|
||||
@ -926,7 +951,10 @@ fn token_deshielded_transfer() {
|
||||
fn token_new_fungible_definition_with_authority() {
|
||||
let mut state = V03State::new_with_genesis_accounts(&[], vec![], 0);
|
||||
deploy_token(&mut state);
|
||||
let authority_key: [u8; 32] = Ids::token_definition().as_ref().try_into().unwrap();
|
||||
let authority_key: [u8; 32] = Ids::token_definition()
|
||||
.as_ref()
|
||||
.try_into()
|
||||
.expect("AccountId is always 32 bytes");
|
||||
let instruction = token_core::Instruction::NewFungibleDefinitionWithAuthority {
|
||||
name: String::from("AuthCoin"),
|
||||
initial_supply: 1_000_000_u128,
|
||||
@ -965,7 +993,10 @@ fn token_new_fungible_definition_with_authority() {
|
||||
fn token_set_authority_revoke() {
|
||||
let mut state = V03State::new_with_genesis_accounts(&[], vec![], 0);
|
||||
deploy_token(&mut state);
|
||||
let authority_key: [u8; 32] = Ids::token_definition().as_ref().try_into().unwrap();
|
||||
let authority_key: [u8; 32] = Ids::token_definition()
|
||||
.as_ref()
|
||||
.try_into()
|
||||
.expect("AccountId is always 32 bytes");
|
||||
|
||||
// Create token with authority
|
||||
let instruction = token_core::Instruction::NewFungibleDefinitionWithAuthority {
|
||||
|
||||
@ -43,4 +43,4 @@ pub fn set_authority(
|
||||
definition_post.data = Data::from(&definition);
|
||||
|
||||
vec![AccountPostState::new(definition_post)]
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user