style: run cargo clippy

This commit is contained in:
PoiScript 2023-11-17 14:18:25 +08:00
parent e924359df6
commit c4d9aa4c51
No known key found for this signature in database
GPG key ID: 22C2B1249D99985E
2 changed files with 2 additions and 2 deletions

View file

@ -166,7 +166,7 @@ fn headline_tags_node(input: Input) -> IResult<Input, GreenElement, ()> {
can_not_be_ws = false;
debug_assert!(i > ii, "{} > {}", i, ii);
i = ii;
} else if String::from_utf8_lossy(&item)
} else if String::from_utf8_lossy(item)
.chars()
// https://github.com/yyr/org-mode/blob/d8494b5668ad4d4e68e83228ae8451eaa01d2220/lisp/org-element.el#L922C25-L922C32
.all(|c| c.is_alphanumeric() || c == '_' || c == '@' || c == '#' || c == '%')

View file

@ -220,7 +220,7 @@ fn list_item_content_node(input: Input, indent: usize) -> IResult<Input, (bool,
match get_line_indent(input.as_str()) {
Some(next_indent) => {
if next_indent <= indent {
let (input, head) = previous_blank_line.unwrap_or_else(|| (input, head));
let (input, head) = previous_blank_line.unwrap_or((input, head));
if !head.is_empty() {
children.extend(paragraph_nodes(head)?);
}