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.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/makefile/token.rs b/src/makefile/token.rs
index 31adcfc..63c48d9 100644
--- a/src/makefile/token.rs
+++ b/src/makefile/token.rs
@@ -192,21 +192,21 @@ enum Delimiter {
}
impl Delimiter {
- fn start(&self) -> &'static str {
+ const fn start(&self) -> &'static str {
match self {
Self::Parens => "(",
Self::Braces => "{",
}
}
- fn start_char(&self) -> char {
+ const fn start_char(&self) -> char {
match self {
Self::Parens => '(',
Self::Braces => '{',
}
}
- fn end(&self) -> &'static str {
+ const fn end(&self) -> &'static str {
match self {
Self::Parens => ")",
Self::Braces => "}",
@@ -317,7 +317,7 @@ fn text_but_not<'a, E: Err<'a>>(
) -> impl FnMut(&'a str) -> IResult<&'a str, TokenString, E> {
map(
take_till1(move |c| c == '$' || ends.contains(&c)),
- |x: &str| TokenString::text(x), // TODO don't allocate an entire Vec for that
+ TokenString::text, // TODO don't allocate an entire Vec for that
)
}
@@ -349,7 +349,7 @@ fn single_token_but_not<'a, E: Err<'a>>(
alt((
text_but_not(tbn_ends),
macro_expansion,
- nested_delimiters(ends.clone(), context),
+ nested_delimiters(ends, context),
))
}