aboutsummaryrefslogtreecommitdiff
path: root/src/makefile/token.rs
diff options
context:
space:
mode:
authorMelody Horn <melody@boringcactus.com>2021-04-06 15:30:47 -0600
committerMelody Horn <melody@boringcactus.com>2021-04-06 15:30:47 -0600
commitcffe9f4085cf28e9a1e62346cfb31ed0470a49ff (patch)
tree7bfd667b0c1952275ff478afc3bcad0a0c0dbf53 /src/makefile/token.rs
parentccd9a6560c34690af803ef4dae2e53621ae608c1 (diff)
downloadmakers-cffe9f4085cf28e9a1e62346cfb31ed0470a49ff.tar.gz
makers-cffe9f4085cf28e9a1e62346cfb31ed0470a49ff.zip
appease our wire lord and savior
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),
))
}