diff --git a/src/syntax/headline.rs b/src/syntax/headline.rs index 1821659..01330fc 100644 --- a/src/syntax/headline.rs +++ b/src/syntax/headline.rs @@ -166,7 +166,7 @@ fn headline_tags_node(input: Input) -> IResult { 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 == '%') diff --git a/src/syntax/list.rs b/src/syntax/list.rs index d4cbf5f..8979393 100644 --- a/src/syntax/list.rs +++ b/src/syntax/list.rs @@ -220,7 +220,7 @@ fn list_item_content_node(input: Input, indent: usize) -> IResult { 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)?); }