diff --git a/clippy_lints/src/tabs_in_doc_comments.rs b/clippy_lints/src/tabs_in_doc_comments.rs index 3f9692540f7..d68227545a6 100644 --- a/clippy_lints/src/tabs_in_doc_comments.rs +++ b/clippy_lints/src/tabs_in_doc_comments.rs @@ -106,7 +106,7 @@ fn get_chunks_of_tabs(the_str: &str) -> Vec<(u32, u32)> { let char_indices: Vec<_> = the_str.char_indices().collect(); - if char_indices.len() == 1 && char_indices.first().unwrap().1 == '\t' { + if let &[(_, '\t')] = &char_indices.as_slice() { return vec![(0, 1)]; }