From 227929f9ddd3a5dfdab8a5552f457fd6184d3eb2 Mon Sep 17 00:00:00 2001 From: Craig Disselkoen Date: Wed, 6 May 2020 13:28:32 -0700 Subject: simplify by using bail! macro --- crates/ra_env/src/lib.rs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'crates/ra_env') diff --git a/crates/ra_env/src/lib.rs b/crates/ra_env/src/lib.rs index a1c4239be..4f94bffde 100644 --- a/crates/ra_env/src/lib.rs +++ b/crates/ra_env/src/lib.rs @@ -2,7 +2,7 @@ //! [`get_path_for_executable`](fn.get_path_for_executable.html). //! See docs there for more information. -use anyhow::{Error, Result}; +use anyhow::{bail, Result}; use std::env; use std::path::{Path, PathBuf}; use std::process::Command; @@ -27,10 +27,10 @@ pub fn get_path_for_executable(executable_name: impl AsRef) -> Result) -> Result