Clippy lints

This commit is contained in:
Greg Shuflin 2022-10-23 00:35:24 -07:00
parent 3f86c08dc1
commit f0e1d2b045
1 changed files with 2 additions and 2 deletions

View File

@ -23,7 +23,7 @@ pub fn any_char(input: &str) -> ParseResult<&str, char, &str> {
pub fn one_of<'a>(items: &'static str) -> impl Parser<&'a str, &'a str, &'a str> {
move |input: &'a str| {
if let Some(ch) = input.chars().nth(0) {
if let Some(ch) = input.chars().next() {
if items.contains(ch) {
let (first, rest) = input.split_at(1);
return Ok((first, rest));
@ -60,7 +60,7 @@ pub fn identifier(input: &str) -> ParseResult<&str, String, &str> {
_ => return Err(input),
}
while let Some(next) = chars.next() {
for next in chars {
if next.is_alphanumeric() {
buf.push(next);
} else {