Skip to content

Commit

Permalink
fix the lint as requested
Browse files Browse the repository at this point in the history
  • Loading branch information
saschanaz committed Oct 24, 2022
1 parent 6b5f275 commit 8ecbb7e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/tools/lint-docs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,8 @@ impl Lint {
}

fn is_ignored(&self) -> bool {
self.doc
.iter()
.filter(|line| line.starts_with("```rust"))
.all(|line| line.contains(",ignore"))
let blocks: Vec<_> = self.doc.iter().filter(|line| line.starts_with("```rust")).collect();
!blocks.is_empty() && blocks.iter().all(|line| line.contains(",ignore"))
}

/// Checks the doc style of the lint.
Expand Down

0 comments on commit 8ecbb7e

Please sign in to comment.