Skip to content

Commit

Permalink
Clean up some warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
tyler committed Dec 10, 2024
1 parent 0d13671 commit 22fd90f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
8 changes: 2 additions & 6 deletions esi/src/expression.rs
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,6 @@ fn parse_call(identifier: &str, cur: &mut Peekable<Iter<Token>>) -> Result<Expr>
enum Token {
Integer(i32),
String(String),
Symbol(Symbol),
OpenParen,
CloseParen,
OpenBracket,
Expand All @@ -469,9 +468,6 @@ enum Token {
Bareword(String),
}

#[derive(Debug, Clone, PartialEq)]
enum Symbol {}

fn lex_expr(expr: String) -> Result<Vec<Token>> {
let mut result = Vec::new();

Expand Down Expand Up @@ -534,7 +530,6 @@ fn lex_interpolated_expr(cur: &mut Peekable<Chars>) -> Result<Vec<Token>> {
_ => return Err(ExecutionError::ExpressionError("no expression".to_string())),
}

let mut seen_paren = false;
let mut paren_depth = 0;

while let Some(c) = cur.peek() {
Expand All @@ -560,7 +555,6 @@ fn lex_interpolated_expr(cur: &mut Peekable<Chars>) -> Result<Vec<Token>> {
));
}
'(' => {
seen_paren = true;
paren_depth += 1;
cur.next();
result.push(Token::OpenParen);
Expand All @@ -570,6 +564,8 @@ fn lex_interpolated_expr(cur: &mut Peekable<Chars>) -> Result<Vec<Token>> {
result.push(Token::CloseParen);
paren_depth -= 1;
if paren_depth <= 0 {
// Either we've found our final match paren, or we hit a closing paren
// without an opening one. Regardless, we can stop here.
break;
}
}
Expand Down
1 change: 0 additions & 1 deletion esi/src/parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ impl TagNames {
enum ContentType {
Normal,
Interpolated,
Delete,
}

fn do_parse<'a, R>(
Expand Down

0 comments on commit 22fd90f

Please sign in to comment.