summaryrefslogtreecommitdiff
path: root/crates/typst-syntax/src/lexer.rs
diff options
context:
space:
mode:
authorPgBiel <9021226+PgBiel@users.noreply.github.com>2024-07-29 16:20:55 -0300
committerPgBiel <9021226+PgBiel@users.noreply.github.com>2024-07-29 18:24:16 -0300
commitaf7e258f800d3c4175859e5604ae9dea4b950add (patch)
tree5455644f571673f6ebf91f29ca9400abd7cd7e12 /crates/typst-syntax/src/lexer.rs
parent93bd46da8fe25d8334ce64452723c0a9d883300d (diff)
apply suggested improvementswarn-suppression
Diffstat (limited to 'crates/typst-syntax/src/lexer.rs')
-rw-r--r--crates/typst-syntax/src/lexer.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/crates/typst-syntax/src/lexer.rs b/crates/typst-syntax/src/lexer.rs
index 349ba9ab..596caf18 100644
--- a/crates/typst-syntax/src/lexer.rs
+++ b/crates/typst-syntax/src/lexer.rs
@@ -359,9 +359,10 @@ impl Lexer<'_> {
if ident == "allow" {
SyntaxKind::AnnotationName
} else {
- let error = self.error(eco_format!("invalid annotation name"));
+ self.error(eco_format!("invalid annotation name"));
self.hint("must be 'allow'");
- error
+
+ SyntaxKind::Error
}
}