summaryrefslogtreecommitdiff
path: root/src/parse/mod.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2021-12-30 11:37:11 +0100
committerLaurenz <laurmaedje@gmail.com>2021-12-30 12:00:12 +0100
commitf5dcb84e36a38182218c7f907b861b12d2bd2c1c (patch)
tree1fce04fb53d2ad5b61f5f3151e43d80e2684e579 /src/parse/mod.rs
parentfef55025177ea4f248e61b68fab365bfbc0e47fb (diff)
Make clippy a bit happier
Diffstat (limited to 'src/parse/mod.rs')
-rw-r--r--src/parse/mod.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/parse/mod.rs b/src/parse/mod.rs
index 0a2f73f5..10aaad23 100644
--- a/src/parse/mod.rs
+++ b/src/parse/mod.rs
@@ -275,13 +275,13 @@ fn primary(p: &mut Parser, atomic: bool) -> ParseResult {
Some(NodeKind::Error(_, _)) => {
p.eat();
- Err(())
+ Err(ParseError)
}
// Nothing.
_ => {
p.expected("expression");
- Err(())
+ Err(ParseError)
}
}
}
@@ -428,7 +428,7 @@ fn item(p: &mut Parser) -> ParseResult<NodeKind> {
marker.end(p, error);
p.eat();
expr(p).ok();
- Err(())
+ Err(ParseError)
}
})?;
@@ -519,7 +519,7 @@ fn args(p: &mut Parser, direct: bool, brackets: bool) -> ParseResult {
Some(NodeKind::LeftBracket) if brackets => {}
_ => {
p.expected("argument list");
- return Err(());
+ return Err(ParseError);
}
}
@@ -689,7 +689,7 @@ fn ident(p: &mut Parser) -> ParseResult {
}
_ => {
p.expected("identifier");
- Err(())
+ Err(ParseError)
}
}
}
@@ -701,7 +701,7 @@ fn body(p: &mut Parser) -> ParseResult {
Some(NodeKind::LeftBrace) => block(p),
_ => {
p.expected_at("body");
- return Err(());
+ return Err(ParseError);
}
}
Ok(())