Skip to content

Commit 53c2aaa

Browse files
committed
Fix lint warnings
1 parent d5d9213 commit 53c2aaa

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

clippy_lints/src/doc/broken_link.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,7 @@ impl BrokenLinkLoader {
7777
}
7878

7979
fn scan_attrs(&mut self, attrs: &[Attribute]) {
80-
for idx in 0..attrs.len() {
81-
let attr = &attrs[idx];
80+
for attr in attrs {
8281
if let AttrKind::DocComment(_com_kind, sym) = attr.kind
8382
&& let AttrStyle::Outer = attr.style
8483
{
@@ -93,10 +92,10 @@ impl BrokenLinkLoader {
9392
// exactly that. It provides an iterator over tuples of the form `(byte position, char)`.
9493
let char_indices: Vec<_> = line.char_indices().collect();
9594

96-
let reading_link_url_new_line = match self.state {
97-
Some(State::ProcessingLinkUrl(UrlState::FilledEntireSingleLine)) => true,
98-
_ => false,
99-
};
95+
let reading_link_url_new_line = matches!(
96+
self.state,
97+
Some(State::ProcessingLinkUrl(UrlState::FilledEntireSingleLine))
98+
);
10099

101100
for (pos, c) in char_indices {
102101
if pos == 0 && c.is_whitespace() {

0 commit comments

Comments
 (0)