Skip to content

Commit

Permalink
fix: Fix cargo check and cargo fmt (#5193)
Browse files Browse the repository at this point in the history
Signed-off-by: Dmitry Murzin <[email protected]>
  • Loading branch information
dima74 authored Oct 24, 2024
1 parent fbe8817 commit 84c117a
Show file tree
Hide file tree
Showing 13 changed files with 16 additions and 37 deletions.
11 changes: 4 additions & 7 deletions crates/iroha/tests/extra_functional/multiple_blocks_created.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,10 @@ use std::{num::NonZero, time::Duration};

use eyre::Result;
use futures_util::StreamExt;
use iroha::{
client::{self},
data_model::{
events::pipeline::{BlockEventFilter, TransactionEventFilter},
parameter::BlockParameter,
prelude::*,
},
use iroha::data_model::{
events::pipeline::{BlockEventFilter, TransactionEventFilter},
parameter::BlockParameter,
prelude::*,
};
use iroha_test_network::*;
use iroha_test_samples::gen_account_in;
Expand Down
5 changes: 1 addition & 4 deletions crates/iroha/tests/extra_functional/normal.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
use eyre::Result;
use iroha::{
client,
data_model::{asset::AssetDefinitionId, parameter::BlockParameter, prelude::*},
};
use iroha::data_model::{asset::AssetDefinitionId, parameter::BlockParameter, prelude::*};
use iroha_test_network::*;
use nonzero_ext::nonzero;

Expand Down
1 change: 0 additions & 1 deletion crates/iroha/tests/extra_functional/offline_peers.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use eyre::{OptionExt, Result};
use futures_util::stream::{FuturesUnordered, StreamExt};
use iroha::{
client::{self},
crypto::KeyPair,
data_model::{
peer::{Peer as DataModelPeer, PeerId},
Expand Down
5 changes: 1 addition & 4 deletions crates/iroha/tests/extra_functional/restart_peer.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
use eyre::Result;
use iroha::{
client::{self},
data_model::prelude::*,
};
use iroha::data_model::prelude::*;
use iroha_test_network::*;
use iroha_test_samples::ALICE_ID;
use tokio::{task::spawn_blocking, time::timeout};
Expand Down
1 change: 0 additions & 1 deletion crates/iroha/tests/extra_functional/unregister_peer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ use std::time::Duration;
use assert_matches::assert_matches;
use eyre::Result;
use iroha::{
client,
client::Client,
data_model::{parameter::BlockParameter, prelude::*},
};
Expand Down
2 changes: 1 addition & 1 deletion crates/iroha/tests/queries/account.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::collections::HashSet;

use eyre::Result;
use iroha::{client, data_model::prelude::*};
use iroha::data_model::prelude::*;
use iroha_test_network::*;
use iroha_test_samples::{gen_account_in, ALICE_ID};

Expand Down
2 changes: 1 addition & 1 deletion crates/iroha/tests/queries/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use iroha::{
client::{self, QueryError},
client::QueryError,
data_model::{
prelude::*,
query::{error::QueryExecutionFail, parameters::MAX_FETCH_SIZE},
Expand Down
6 changes: 3 additions & 3 deletions crates/iroha/tests/queries/query_errors.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use iroha::{
client,
data_model::{prelude::QueryBuilderExt, query::builder::SingleQueryError},
use iroha::data_model::{
prelude::{FindAccounts, QueryBuilderExt},
query::builder::SingleQueryError,
};
use iroha_test_network::NetworkBuilder;
use iroha_test_samples::gen_account_in;
Expand Down
5 changes: 1 addition & 4 deletions crates/iroha/tests/queries/role.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
use std::collections::HashSet;

use eyre::Result;
use iroha::{
client,
data_model::{prelude::*, query::builder::SingleQueryError},
};
use iroha::data_model::{prelude::*, query::builder::SingleQueryError};
use iroha_executor_data_model::permission::account::CanModifyAccountMetadata;
use iroha_test_network::*;
use iroha_test_samples::ALICE_ID;
Expand Down
1 change: 0 additions & 1 deletion crates/iroha/tests/triggers/by_call_trigger.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ use std::{sync::mpsc, thread, time::Duration};
use executor_custom_data_model::mint_rose_args::MintRoseArgs;
use eyre::{eyre, Result, WrapErr};
use iroha::{
client::{self},
crypto::KeyPair,
data_model::{
prelude::*,
Expand Down
3 changes: 1 addition & 2 deletions crates/iroha/tests/triggers/mod.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
use assert_matches::assert_matches;
use iroha::{
client,
client::Client,
data_model::{
asset::{AssetId, AssetValue},
prelude::{Numeric, QueryBuilderExt},
prelude::{FindAssets, Numeric, QueryBuilderExt},
},
};

Expand Down
2 changes: 1 addition & 1 deletion crates/iroha/tests/triggers/time_trigger.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::time::Duration;

use eyre::Result;
use iroha::{
client::{self, Client},
client::Client,
data_model::{
asset::AssetId,
events::pipeline::{BlockEventFilter, BlockStatus},
Expand Down
9 changes: 2 additions & 7 deletions crates/iroha/tests/triggers/trigger_rollback.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
use eyre::Result;
use iroha::{
client,
data_model::{prelude::*, trigger::TriggerId},
};
use iroha::data_model::{prelude::*, trigger::TriggerId};
use iroha_test_network::*;
use iroha_test_samples::ALICE_ID;

Expand Down Expand Up @@ -36,9 +33,7 @@ fn failed_trigger_revert() -> Result<()> {
client.submit_blocking(call_trigger)?;

//Then
let query_result = client
.query(FindAssetsDefinitions::new())
.execute_all()?;
let query_result = client.query(FindAssetsDefinitions::new()).execute_all()?;
assert!(query_result
.iter()
.all(|asset_definition| asset_definition.id() != &asset_definition_id));
Expand Down

0 comments on commit 84c117a

Please sign in to comment.