Use `anyhow::bail`

pull/997/head
Omnikar 3 years ago
parent 833e3e1a25
commit 15af3a3778
No known key found for this signature in database
GPG Key ID: 7DE6694CDA7885ED

@ -2260,7 +2260,7 @@ mod cmd {
path.push(format!("{}.txt", command)); path.push(format!("{}.txt", command));
if !path.is_file() { 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)?; let id = cx.editor.open(path, Action::HorizontalSplit)?;
cx.editor.document_mut(id).unwrap().set_path(None)?; cx.editor.document_mut(id).unwrap().set_path(None)?;

Loading…
Cancel
Save