From 98b36813b2ce7789da5981920b672daa47be1c35 Mon Sep 17 00:00:00 2001 From: Daniel Mueller Date: Mon, 31 Aug 2020 19:25:48 -0700 Subject: Remove application global Result definition In the past we were using an application global custom Result type definition. This makes less sense now that we switched over to using anyhow's Error and Result types. We kept that for the time being, but with this change we remove the type and use anyhow::Result instead. --- src/main.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index 4e6b01d..5af10bb 100644 --- a/src/main.rs +++ b/src/main.rs @@ -79,8 +79,6 @@ use std::ffi; use std::io; use std::process; -use anyhow::Result; - const NITROCLI_ADMIN_PIN: &str = "NITROCLI_ADMIN_PIN"; const NITROCLI_USER_PIN: &str = "NITROCLI_USER_PIN"; const NITROCLI_NEW_ADMIN_PIN: &str = "NITROCLI_NEW_ADMIN_PIN"; @@ -140,7 +138,7 @@ impl<'io> Stdio for ExecCtx<'io> { } /// Parse the command-line arguments and execute the selected command. -fn handle_arguments(ctx: &mut RunCtx<'_>, args: Vec) -> Result<()> { +fn handle_arguments(ctx: &mut RunCtx<'_>, args: Vec) -> anyhow::Result<()> { use structopt::StructOpt; match args::Args::from_iter_safe(args.iter()) { -- cgit v1.2.1