style: run cargo clippy
This commit is contained in:
parent
db7fb70724
commit
ed987d468a
4 changed files with 10 additions and 9 deletions
|
|
@ -46,9 +46,7 @@ impl OrgTable {
|
|||
.filter_map(OrgTableRow::cast)
|
||||
.skip_while(|row| row.is_rule())
|
||||
.skip_while(|row| row.is_standard())
|
||||
.skip_while(|row| row.is_rule())
|
||||
.next()
|
||||
.is_some()
|
||||
.any(|row| !row.is_rule())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -145,9 +145,8 @@ pub trait Traverser {
|
|||
|
||||
/// Called when visiting any token
|
||||
fn token(&mut self, token: SyntaxToken, ctx: &mut TraversalContext) {
|
||||
match token.kind() {
|
||||
TEXT => self.text(token, ctx),
|
||||
_ => {}
|
||||
if token.kind() == TEXT {
|
||||
self.text(token, ctx);
|
||||
}
|
||||
take_control!(ctx);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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(()))
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
#![allow(clippy::type_complexity)]
|
||||
|
||||
use nom::{
|
||||
branch::alt,
|
||||
bytes::complete::{tag, take_till, take_while1},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue