aboutsummaryrefslogtreecommitdiff
path: root/src/makefile/conditional.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/makefile/conditional.rs')
-rw-r--r--src/makefile/conditional.rs10
1 files changed, 5 insertions, 5 deletions
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<String>,
- ) -> anyhow::Result<Option<Self>> {
+ expand_macro: impl Fn(&TokenString) -> Result<String>,
+ ) -> Result<Option<Self>> {
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<String>,
- ) -> anyhow::Result<StateAction> {
+ expand_macro: impl Fn(&TokenString) -> Result<String>,
+ ) -> Result<StateAction> {
Ok(match self {
Self::IfEqual(arg1, arg2) => {
let arg1 = expand_macro(arg1)?;