Skip to content

Commit

Permalink
Migrate anyhow::bail! -> anyhow::anyhow!
Browse files Browse the repository at this point in the history
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
  • Loading branch information
stepancheg authored and facebook-github-bot committed Nov 9, 2023
1 parent 66087d3 commit 4e04395
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion starlark_bin/bin/bazel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down

0 comments on commit 4e04395

Please sign in to comment.