diff --git a/config/src/config.rs b/config/src/config.rs index 248132e3..795c382f 100644 --- a/config/src/config.rs +++ b/config/src/config.rs @@ -77,7 +77,7 @@ impl Config { if let Some(path) = filename { let mut config_content = std::fs::read_to_string(path) - .map_err(|e| format!("Failed to read config file: {}", e))?; + .map_err(|e| format!("Failed to read config file: {}", e))?; config_content = Self::substitute_env_vars(config_content)?; figment_config = figment_config.merge(Toml::string(&config_content)); } diff --git a/service/src/service.rs b/service/src/service.rs index 5ebff0ef..e322713e 100644 --- a/service/src/service.rs +++ b/service/src/service.rs @@ -129,8 +129,8 @@ pub async fn run() -> anyhow::Result<()> { // Load the json-rpc service configuration, which is a combination of the // general configuration options for any indexer service and specific // options added for JSON-RPC - let config = - MainConfig::parse(indexer_config::ConfigPrefix::Service, cli.config.as_ref()).map_err(|e| { + let config = MainConfig::parse(indexer_config::ConfigPrefix::Service, cli.config.as_ref()) + .map_err(|e| { error!( "Invalid configuration file `{}`: {}, if a value is missing you can also use \ --config to fill the rest of the values", diff --git a/tap-agent/src/config.rs b/tap-agent/src/config.rs index 84dff3b4..51a549a6 100644 --- a/tap-agent/src/config.rs +++ b/tap-agent/src/config.rs @@ -4,9 +4,9 @@ use clap::Parser; use indexer_config::{Config as IndexerConfig, ConfigPrefix}; use reqwest::Url; -use tracing::error; use std::path::PathBuf; use std::{collections::HashMap, str::FromStr}; +use tracing::error; use anyhow::Result; use thegraph_core::{Address, DeploymentId}; @@ -183,15 +183,15 @@ impl Config { pub fn from_cli() -> Result { let cli = Cli::parse(); let indexer_config = - IndexerConfig::parse(ConfigPrefix::Tap, cli.config.as_ref()).map_err(|e| { - error!( - "Invalid configuration file `{}`: {}, if a value is missing you can also use \ + IndexerConfig::parse(ConfigPrefix::Tap, cli.config.as_ref()).map_err(|e| { + error!( + "Invalid configuration file `{}`: {}, if a value is missing you can also use \ --config to fill the rest of the values", - cli.config.unwrap_or_default().display(), - e - ); - anyhow::anyhow!(e) - })?; + cli.config.unwrap_or_default().display(), + e + ); + anyhow::anyhow!(e) + })?; let config: Config = indexer_config.into(); // Enables tracing under RUST_LOG variable