Skip to content

Commit

Permalink
Merge branch 'fix-clippy' into 'master'
Browse files Browse the repository at this point in the history
Fix minor clippy lints

See merge request mkjeldsen/commitmsgfmt!63
  • Loading branch information
commonquail committed Oct 13, 2023
2 parents 500c22f + 96f121a commit a45c338
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ fn is_line_blank_or_whitespace(line: &str) -> bool {
}

fn is_line_footnote(line: &str) -> bool {
if line.starts_with('[') {
let mut chars = line[1..].chars();
if let Some(rest) = line.strip_prefix('[') {
let mut chars = rest.chars();
if chars.next() == Some(']') {
// Reject "[]"
return false;
Expand Down Expand Up @@ -245,8 +245,7 @@ fn line_as_list_item(line: &str) -> Option<Token> {
let mut li_state = LiState::New;
let mut ix_li_type_start = 0;
let mut ix_li_content_start: Option<usize> = None;
let mut iter = line.char_indices();
while let Some((ix, c)) = iter.next() {
for (ix, c) in line.char_indices() {
match li_state {
LiState::New | LiState::IndentSp1 | LiState::IndentSp2 => {
ix_li_type_start = ix;
Expand Down

0 comments on commit a45c338

Please sign in to comment.