Skip to content

Commit

Permalink
style: cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosvdr committed Oct 8, 2024
1 parent 124c95a commit f23e272
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion config/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
Expand Down
4 changes: 2 additions & 2 deletions service/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
18 changes: 9 additions & 9 deletions tap-agent/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down Expand Up @@ -183,15 +183,15 @@ impl Config {
pub fn from_cli() -> Result<Self> {
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
Expand Down

0 comments on commit f23e272

Please sign in to comment.