Skip to content

Commit

Permalink
chore: replace some from with try_from calls (#6832)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsse authored Jan 17, 2024
1 parent 156cb13 commit 02f1c1e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion crates/cast/bin/cmd/estimate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ impl EstimateArgs {
let EstimateArgs { from, to, sig, args, value, rpc, etherscan, command } = self;

let figment = Figment::from(Config::figment()).merge(etherscan).merge(rpc);
let config = Config::from_provider(figment);
let config = Config::try_from(figment)?;

let provider = utils::get_provider(&config)?;
let chain = utils::get_chain(config.chain, &provider).await?;
Expand Down
2 changes: 1 addition & 1 deletion crates/cast/bin/cmd/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ impl RunArgs {
let figment =
Config::figment_with_root(find_project_root_path(None).unwrap()).merge(self.rpc);
let evm_opts = figment.extract::<EvmOpts>()?;
let mut config = Config::from_provider(figment).sanitized();
let mut config = Config::try_from(figment)?.sanitized();

let compute_units_per_second =
if self.no_rate_limit { Some(u64::MAX) } else { self.compute_units_per_second };
Expand Down

0 comments on commit 02f1c1e

Please sign in to comment.