Change to anyhow::Result at top-level

This commit is contained in:
Jon Häggblad
2024-03-15 09:55:57 +01:00
parent 6e8c0ad90e
commit 08ed7b42de
2 changed files with 2 additions and 4 deletions
+1 -2
View File
@@ -5,7 +5,6 @@ use crate::Cli;
use clap::CommandFactory;
use clap::Subcommand;
use nym_bin_common::completions::{fig_generate, ArgShell};
use std::error::Error;
pub(crate) mod build_info;
pub(crate) mod helpers;
@@ -50,7 +49,7 @@ pub(crate) enum Commands {
GenerateFigSpec,
}
pub(crate) async fn execute(args: Cli) -> Result<(), Box<dyn Error + Send + Sync>> {
pub(crate) async fn execute(args: Cli) -> anyhow::Result<()> {
let bin_name = "nym-gateway";
match args.command {
+1 -2
View File
@@ -11,7 +11,6 @@ use nym_bin_common::bin_info;
use nym_bin_common::logging::{maybe_print_banner, setup_logging};
use nym_bin_common::output_format::OutputFormat;
use nym_network_defaults::setup_env;
use std::error::Error;
use std::sync::OnceLock;
mod commands;
@@ -42,7 +41,7 @@ struct Cli {
}
#[tokio::main]
async fn main() -> Result<(), Box<dyn Error + Send + Sync>> {
async fn main() -> anyhow::Result<()> {
setup_logging();
let args = Cli::parse();