aboutsummaryrefslogtreecommitdiff
path: root/src/makefile/token.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/makefile/token.rs')
-rw-r--r--src/makefile/token.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/makefile/token.rs b/src/makefile/token.rs
index 16403ff..076ac60 100644
--- a/src/makefile/token.rs
+++ b/src/makefile/token.rs
@@ -1,7 +1,7 @@
use std::fmt;
use std::str::FromStr;
-use anyhow::Context;
+use eyre::WrapErr;
use nom::{
branch::alt,
bytes::complete::{tag, take_till1, take_while1},
@@ -252,16 +252,16 @@ fn full_text_tokens(input: &str) -> IResult<&str, TokenString> {
all_consuming(tokens_but_not(vec![]))(input)
}
-pub fn tokenize(input: &str) -> anyhow::Result<TokenString> {
+pub fn tokenize(input: &str) -> eyre::Result<TokenString> {
let (_, result) = full_text_tokens(input)
.finish()
- .map_err(|err| anyhow::anyhow!(err.to_string()))
+ .map_err(|err| eyre::eyre!(err.to_string()))
.with_context(|| format!("couldn't parse {:?}", input))?;
Ok(result)
}
impl FromStr for TokenString {
- type Err = anyhow::Error;
+ type Err = eyre::Error;
fn from_str(s: &str) -> Result<Self, Self::Err> {
tokenize(s)