mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-28 11:17:26 +03:00
fix the lint as requested
This commit is contained in:
@@ -37,10 +37,8 @@ fn doc_contains(&self, text: &str) -> bool {
|
||||
}
|
||||
|
||||
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.
|
||||
|
||||
Reference in New Issue
Block a user