From 4e043953b591eccbaeb170d8d2093806f672169c Mon Sep 17 00:00:00 2001 From: Stiopa Koltsov Date: Thu, 9 Nov 2023 15:28:03 -0800 Subject: [PATCH] Migrate anyhow::bail! -> anyhow::anyhow! Summary: This is in our code convention: https://www.internalfb.com/code/fbsource/[ca31f968f490ddb6b5f0cda213650f85f5efa9c2]/fbcode/buck2/gazebo_lint/gazebo_lint/src/lib.rs?lines=135-139 (Somehow it does not seem to always work though) We can discuss this code convention, but for now I'm migrating gazebo-lint to patternlint (D51170750). Reviewed By: ndmitchell Differential Revision: D51170749 fbshipit-source-id: 344c55ae97fdde750490d8c2916ee7a23637a5da --- starlark_bin/bin/bazel.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/starlark_bin/bin/bazel.rs b/starlark_bin/bin/bazel.rs index 1c7af8641..652fd776c 100644 --- a/starlark_bin/bin/bazel.rs +++ b/starlark_bin/bin/bazel.rs @@ -141,7 +141,7 @@ pub(crate) fn main( prelude: &[PathBuf], ) -> anyhow::Result<()> { if !lsp { - anyhow::bail!("Bazel mode only supports `--lsp`"); + return Err(anyhow::anyhow!("Bazel mode only supports `--lsp`")); } // NOTE: Copied from `main.rs`