style: run cargo clippy

This commit is contained in:
PoiScript 2023-11-15 13:03:43 +08:00
parent db7fb70724
commit ed987d468a
No known key found for this signature in database
GPG key ID: 22C2B1249D99985E
4 changed files with 10 additions and 9 deletions

View file

@ -120,9 +120,11 @@ fn headline_stars(input: Input) -> IResult<Input, Input, ()> {
if level == 0 {
Err(nom::Err::Error(()))
} else if input.input_len() == level {
Ok(input.take_split(level))
} else if bytes[level] == b'\n' || bytes[level] == b'\r' || bytes[level] == b' ' {
} else if input.input_len() == level
|| bytes[level] == b'\n'
|| bytes[level] == b'\r'
|| bytes[level] == b' '
{
Ok(input.take_split(level))
} else {
Err(nom::Err::Error(()))

View file

@ -1,3 +1,5 @@
#![allow(clippy::type_complexity)]
use nom::{
branch::alt,
bytes::complete::{tag, take_till, take_while1},