Skip to content
Snippets Groups Projects
Commit c563df75 authored by Éloïs's avatar Éloïs
Browse files

clippy

parent afd40290
No related branches found
No related tags found
1 merge request!50Custom genesis for end2end tests & cucumber binary in docker
This commit is part of merge request !50. Comments created here will be created in the context of that merge request.
...@@ -118,7 +118,7 @@ async fn who_have(world: &mut DuniterWorld, who: String, amount: u64, unit: Stri ...@@ -118,7 +118,7 @@ async fn who_have(world: &mut DuniterWorld, who: String, amount: u64, unit: Stri
} }
// Create {amount} ĞD for {who} // Create {amount} ĞD for {who}
common::balances::set_balance(&world.api(), &world.client(), who, amount).await?; common::balances::set_balance(world.api(), world.client(), who, amount).await?;
Ok(()) Ok(())
} }
...@@ -126,7 +126,7 @@ async fn who_have(world: &mut DuniterWorld, who: String, amount: u64, unit: Stri ...@@ -126,7 +126,7 @@ async fn who_have(world: &mut DuniterWorld, who: String, amount: u64, unit: Stri
#[when(regex = r"(\d+) blocks? later")] #[when(regex = r"(\d+) blocks? later")]
async fn n_blocks_later(world: &mut DuniterWorld, n: usize) -> Result<()> { async fn n_blocks_later(world: &mut DuniterWorld, n: usize) -> Result<()> {
for _ in 0..n { for _ in 0..n {
common::create_empty_block(&world.client()).await?; common::create_empty_block(world.client()).await?;
} }
Ok(()) Ok(())
} }
...@@ -145,9 +145,9 @@ async fn transfer( ...@@ -145,9 +145,9 @@ async fn transfer(
let (amount, is_ud) = parse_amount(amount, &unit); let (amount, is_ud) = parse_amount(amount, &unit);
if is_ud { if is_ud {
common::balances::transfer_ud(&world.api(), &world.client(), from, amount, to).await common::balances::transfer_ud(world.api(), world.client(), from, amount, to).await
} else { } else {
common::balances::transfer(&world.api(), &world.client(), from, amount, to).await common::balances::transfer(world.api(), world.client(), from, amount, to).await
} }
} }
...@@ -157,7 +157,7 @@ async fn send_all_to(world: &mut DuniterWorld, from: String, to: String) -> Resu ...@@ -157,7 +157,7 @@ async fn send_all_to(world: &mut DuniterWorld, from: String, to: String) -> Resu
let from = AccountKeyring::from_str(&from).expect("unknown from"); let from = AccountKeyring::from_str(&from).expect("unknown from");
let to = AccountKeyring::from_str(&to).expect("unknown to"); let to = AccountKeyring::from_str(&to).expect("unknown to");
common::balances::transfer_all(&world.api(), &world.client(), from, to).await common::balances::transfer_all(world.api(), world.client(), from, to).await
} }
#[then(regex = r"([a-zA-Z]+) should have (\d+) ĞD")] #[then(regex = r"([a-zA-Z]+) should have (\d+) ĞD")]
......
...@@ -257,7 +257,7 @@ where ...@@ -257,7 +257,7 @@ where
// Initial authorities // Initial authorities
if maybe_force_authority.is_some() { if maybe_force_authority.is_some() {
if smith_data.session_keys.is_some() { if smith_data.session_keys.is_some() {
return Err(format!("session_keys field forbidden",)); return Err("session_keys field forbidden".to_owned());
} }
if *idty_index == 1 { if *idty_index == 1 {
initial_authorities.insert(1, (identity.pubkey.clone(), true)); initial_authorities.insert(1, (identity.pubkey.clone(), true));
...@@ -312,9 +312,7 @@ where ...@@ -312,9 +312,7 @@ where
} }
if maybe_force_authority.is_none() && online_authorities_counter == 0 { if maybe_force_authority.is_none() && online_authorities_counter == 0 {
return Err(format!( return Err("The session_keys field must be filled in for at least one smith.".to_owned());
"The session_keys field must be filled in for at least one smith.",
));
} }
let genesis_data = GenesisData { let genesis_data = GenesisData {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment