aboutsummaryrefslogtreecommitdiff
path: root/src/makefile/macro.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/makefile/macro.rs')
-rw-r--r--src/makefile/macro.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/makefile/macro.rs b/src/makefile/macro.rs
index f18060f..e760282 100644
--- a/src/makefile/macro.rs
+++ b/src/makefile/macro.rs
@@ -2,7 +2,7 @@ use std::collections::HashMap;
use std::env;
use std::fmt;
-use anyhow::Context;
+use eyre::{bail, Result, WrapErr};
use regex::Regex;
use super::functions;
@@ -16,9 +16,9 @@ pub enum Source {
Builtin,
}
-pub trait LookupInternal: for<'a> Fn(&'a str) -> anyhow::Result<String> {}
+pub trait LookupInternal: for<'a> Fn(&'a str) -> Result<String> {}
-impl<F: for<'a> Fn(&'a str) -> anyhow::Result<String>> LookupInternal for F {}
+impl<F: for<'a> Fn(&'a str) -> Result<String>> LookupInternal for F {}
#[derive(Clone)]
pub struct Set<'parent, 'lookup> {
@@ -51,13 +51,13 @@ impl<'parent, 'lookup> Set<'parent, 'lookup> {
}
}
- fn lookup_internal(&self, name: &str) -> anyhow::Result<String> {
+ fn lookup_internal(&self, name: &str) -> Result<String> {
if let Some(lookup) = self.lookup_internal {
lookup(name)
} else if let Some(parent) = self.parent {
parent.lookup_internal(name)
} else {
- anyhow::bail!("no lookup possible")
+ bail!("no lookup possible")
}
}
@@ -80,7 +80,7 @@ impl<'parent, 'lookup> Set<'parent, 'lookup> {
self.data.remove(name)
}
- pub fn expand(&self, text: &TokenString) -> anyhow::Result<String> {
+ pub fn expand(&self, text: &TokenString) -> Result<String> {
let mut result = String::new();
for token in text.tokens() {
match token {