fix the lint as requested

This commit is contained in:
Kagami Sascha Rosylight 2022-10-24 21:25:30 +02:00
parent 6b5f2753f7
commit 8ecbb7e39a

View file

@ -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.