Eliminate to_string() in Ident comparisons
diff --git a/src/token.rs b/src/token.rs
index b195fda..7f2ebd7 100644
--- a/src/token.rs
+++ b/src/token.rs
@@ -351,7 +351,7 @@
fn parse(input: ::buffer::Cursor) -> ::synom::PResult<Underscore> {
match input.term() {
Some((term, rest)) => {
- if term.to_string() == "_" {
+ if term == "_" {
Ok((Underscore([term.span()]), rest))
} else {
::parse_error()
@@ -795,7 +795,7 @@
new: fn(Span) -> T,
) -> PResult<'a, T> {
if let Some((term, rest)) = tokens.term() {
- if term.to_string() == keyword {
+ if term == keyword {
return Ok((new(term.span()), rest));
}
}