From 15af3a3778662fe1f7e1480fe5792a9fbe6f8cd1 Mon Sep 17 00:00:00 2001 From: Omnikar Date: Mon, 8 Nov 2021 06:28:35 -0500 Subject: [PATCH] Use `anyhow::bail` --- helix-term/src/commands.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs index 2891d8172..fee5a0588 100644 --- a/helix-term/src/commands.rs +++ b/helix-term/src/commands.rs @@ -2260,7 +2260,7 @@ mod cmd { path.push(format!("{}.txt", command)); if !path.is_file() { - return Err(anyhow!("No help available for '{}'", args.join(" "))); + bail!("No help available for '{}'", args.join(" ")); } let id = cx.editor.open(path, Action::HorizontalSplit)?; cx.editor.document_mut(id).unwrap().set_path(None)?;