From 2b9b938327da6f46b3eef3d7b2dbd338e8a5c1b9 Mon Sep 17 00:00:00 2001 From: dbr Date: Tue, 15 Mar 2022 23:05:04 +1100 Subject: [PATCH] Fix misused anyhow! macro Was msising a return, which bail! includes --- xtask/src/bindgen.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xtask/src/bindgen.rs b/xtask/src/bindgen.rs index 1beb900..830fa39 100644 --- a/xtask/src/bindgen.rs +++ b/xtask/src/bindgen.rs @@ -1,5 +1,5 @@ use crate::flags::Bindgen; -use anyhow::{anyhow, Context, Result}; +use anyhow::{anyhow, Context, Result, bail}; use std::path::{Path, PathBuf}; impl Bindgen { @@ -140,7 +140,7 @@ fn generate_binding_file( eprintln!("Executing bindgen [output = {}]", output.display()); let status = cmd.status().context("Failed to execute bindgen")?; if !status.success() { - anyhow!( + bail!( "Failed to execute bindgen: {}, see output for details", status );