From 093e58de2ffc8243e6ff929f50a2aaa6ef60848b Mon Sep 17 00:00:00 2001 From: Melody Horn Date: Thu, 1 Apr 2021 17:44:50 -0600 Subject: slightly fancier errors --- src/makefile/conditional.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/makefile/conditional.rs') diff --git a/src/makefile/conditional.rs b/src/makefile/conditional.rs index 0b4de01..149638e 100644 --- a/src/makefile/conditional.rs +++ b/src/makefile/conditional.rs @@ -1,4 +1,4 @@ -use anyhow::bail; +use eyre::{bail, Result}; use super::token::TokenString; @@ -83,8 +83,8 @@ fn decode_condition_args(line_body: &str) -> Option<(TokenString, TokenString)> impl Line { pub fn from( line: &str, - expand_macro: impl Fn(&TokenString) -> anyhow::Result, - ) -> anyhow::Result> { + expand_macro: impl Fn(&TokenString) -> Result, + ) -> Result> { Ok(Some(if let Some(line) = line.strip_prefix("ifeq ") { match decode_condition_args(line) { Some((arg1, arg2)) => Self::IfEqual(arg1, arg2), @@ -117,8 +117,8 @@ impl Line { &self, current_state: Option<&State>, is_macro_defined: impl Fn(&str) -> bool, - expand_macro: impl Fn(&TokenString) -> anyhow::Result, - ) -> anyhow::Result { + expand_macro: impl Fn(&TokenString) -> Result, + ) -> Result { Ok(match self { Self::IfEqual(arg1, arg2) => { let arg1 = expand_macro(arg1)?; -- cgit v1.2.3