From a90b03f79943d9044f37f76b5968c09682e6fd50 Mon Sep 17 00:00:00 2001 From: Avinash Sajjanshetty Date: Wed, 11 Oct 2023 08:55:24 +0530 Subject: [PATCH] use `anyhow bail` to return error --- bottomless-cli/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bottomless-cli/src/main.rs b/bottomless-cli/src/main.rs index 2e9dc38b..e8e07036 100644 --- a/bottomless-cli/src/main.rs +++ b/bottomless-cli/src/main.rs @@ -218,7 +218,7 @@ fn verify_db(path: &PathBuf) -> Result<()> { if result == "ok" { Ok(()) } else { - Err(anyhow::anyhow!(result.to_string())) + anyhow::bail!("{result}") } }