Skip to content

Commit bc3ff86

Browse files
committed
Refactor, remove not used variable
1 parent 83b3de7 commit bc3ff86

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

clippy_lints/src/doc/broken_link.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ use rustc_span::{BytePos, Span};
66
use super::DOC_BROKEN_LINK;
77

88
pub fn check(cx: &LateContext<'_>, attrs: &[Attribute]) {
9-
let broken_links: Vec<_> = BrokenLinkLoader::collect_spans_broken_link(attrs);
10-
11-
for span in broken_links {
9+
for span in BrokenLinkLoader::collect_spans_broken_link(attrs) {
1210
span_lint(cx, DOC_BROKEN_LINK, span, "possible broken doc link");
1311
}
1412
}
@@ -34,18 +32,14 @@ impl BrokenLinkLoader {
3432
loader.spans_broken_link
3533
}
3634

37-
fn scan_attrs(&mut self, attrs: &[Attribute]) -> Vec<(Span, String)> {
38-
let broken_links: Vec<(Span, String)> = vec![];
39-
35+
fn scan_attrs(&mut self, attrs: &[Attribute]) {
4036
for attr in attrs {
4137
if let AttrKind::DocComment(_com_kind, sym) = attr.kind
4238
&& let AttrStyle::Outer = attr.style
4339
{
4440
self.scan_line(sym.as_str(), attr.span);
4541
}
4642
}
47-
48-
broken_links
4943
}
5044

5145
fn scan_line(&mut self, the_str: &str, attr_span: Span) {

0 commit comments

Comments
 (0)