Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
hal3e committed Oct 23, 2023
1 parent 9ff6e84 commit 3ff283f
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 23 deletions.
3 changes: 2 additions & 1 deletion packages/fuels-core/src/codec/abi_decoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,14 @@ impl ABIDecoder {
mod tests {
use std::vec;

use ParamType::*;

use super::*;
use crate::{
constants::WORD_SIZE,
traits::Parameterize,
types::{enum_variants::EnumVariants, errors::Error, StaticStringToken, U256},
};
use ParamType::*;

#[test]
fn decode_int() -> Result<()> {
Expand Down
7 changes: 5 additions & 2 deletions packages/fuels-test-helpers/src/accounts.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
use std::mem::size_of;

use crate::node_types::{ChainConfig, Config};
use fuels_accounts::{fuel_crypto::SecretKey, wallet::WalletUnlocked, ViewOnlyAccount};
use fuels_core::types::errors::Result;

use crate::{setup_custom_assets_coins, setup_test_provider, wallets_config::*};
use crate::{
node_types::{ChainConfig, Config},
setup_custom_assets_coins, setup_test_provider,
wallets_config::*,
};

/// Launches a local Fuel node, instantiates a provider, and returns a wallet.
/// The provider and the wallets are instantiated with the default configs.
Expand Down
14 changes: 8 additions & 6 deletions packages/fuels-test-helpers/src/fuel_bin_service.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
use fuels_core::types::errors::{Error, Result as FuelResult};
use tempfile::NamedTempFile;
use std::{net::SocketAddr, path::PathBuf, time::Duration};

use fuel_core_client::client::FuelClient;
use fuel_core_services::State;
use std::{net::SocketAddr, path::PathBuf, time::Duration};

use crate::node_types::{Config, DbType, Trigger};
use fuels_core::error;
use fuels_core::{
error,
types::errors::{Error, Result as FuelResult},
};
use portpicker::{is_free, pick_unused_port};
use tempfile::NamedTempFile;
use tokio::{process::Command, spawn, task::JoinHandle, time::sleep};

use crate::node_types::{Config, DbType, Trigger};

#[derive(Debug)]
struct ExtendedConfig {
config: Config,
Expand Down
8 changes: 2 additions & 6 deletions packages/fuels-test-helpers/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
//! Testing helpers/utilities for Fuel SDK.
extern crate core;

use fuel_core_chain_config::StateConfig;

#[cfg(feature = "fuels-accounts")]
pub use accounts::*;

use fuel_core_chain_config::StateConfig;
use fuel_tx::{Bytes32, UtxoId};
use fuel_types::{AssetId, Nonce};
use fuels_accounts::provider::Provider;
Expand All @@ -18,12 +16,10 @@ use fuels_core::{
message::{Message, MessageStatus},
},
};

pub use node_types::*;
use rand::Fill;
use utils::{into_coin_configs, into_message_configs};
pub use wallets_config::*;

pub use node_types::*;
mod node_types;

#[cfg(not(feature = "fuel-core-lib"))]
Expand Down
3 changes: 0 additions & 3 deletions packages/fuels-test-helpers/src/node_types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,9 @@ use std::{
};

pub use fuel_core_chain_config::ChainConfig;

use fuel_types::{BlockHeight, Word};
use fuels_core::constants::WORD_SIZE;

use serde::{de::Error as SerdeError, Deserializer, Serializer};

use serde_with::{DeserializeAs, SerializeAs};

const MAX_DATABASE_CACHE_SIZE: usize = 10 * 1024 * 1024;
Expand Down
7 changes: 3 additions & 4 deletions packages/fuels-test-helpers/src/service.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
use crate::Config;
use fuels_core::types::errors::{error, Error, Result};
use std::net::SocketAddr;

use fuel_core_services::State;

#[cfg(feature = "fuel-core-lib")]
use fuel_core::service::{FuelService as CoreFuelService, ServiceTrait};
use fuel_core_services::State;
use fuels_core::types::errors::{error, Error, Result};

#[cfg(not(feature = "fuel-core-lib"))]
use crate::fuel_bin_service::FuelService as BinFuelService;
use crate::Config;

pub struct FuelService {
#[cfg(feature = "fuel-core-lib")]
Expand Down
1 change: 0 additions & 1 deletion packages/fuels/tests/providers.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use std::{iter, ops::Add, str::FromStr, vec};

use chrono::{DateTime, Duration, NaiveDateTime, TimeZone, Utc};

use fuel_core_types::{
fuel_crypto::rand::{self, Rng},
tai64::Tai64,
Expand Down

0 comments on commit 3ff283f

Please sign in to comment.