Skip to content

Commit

Permalink
chore: run cargo-clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
renan061 committed Apr 12, 2023
1 parent 7933a6a commit 3d23f70
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,18 +81,18 @@ impl TxManagerConfig {

let provider_http_endpoint = env_cli_config
.tx_provider_http_endpoint
.unwrap_or(DEFAULT_HTTP_ENDPOINT.to_string());
.unwrap_or_else(|| DEFAULT_HTTP_ENDPOINT.to_string());

let chain_id = env_cli_config.tx_chain_id.ok_or(Error::MissingChainId)?;
let chain_is_legacy = env_cli_config.tx_chain_is_legacy.unwrap_or(false);

let database_path = env_cli_config
.tx_database_path
.unwrap_or(DEFAULT_DATABASE_PATH.to_string());
.unwrap_or_else(|| DEFAULT_DATABASE_PATH.to_string());

let gas_oracle_api_key = env_cli_config
.tx_gas_oracle_api_key
.unwrap_or(DEFAULT_GAS_ORACLE_API_KEY.to_string());
.unwrap_or_else(|| DEFAULT_GAS_ORACLE_API_KEY.to_string());

Ok(Self {
default_confirmations,
Expand Down
4 changes: 2 additions & 2 deletions src/gas_oracle/default.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ pub enum DefaultGasOracleError {
Default,
}

#[derive(Clone, Debug)]
#[derive(Clone, Debug, Default)]
pub struct DefaultGasOracle {}

impl DefaultGasOracle {
pub fn new() -> DefaultGasOracle {
DefaultGasOracle {}
DefaultGasOracle::default()
}
}

Expand Down

0 comments on commit 3d23f70

Please sign in to comment.