From 2e8f2dcccbb0a54da75e3ad74460dcb04c905f8f Mon Sep 17 00:00:00 2001 From: Max Claus Nunes Date: Mon, 18 Nov 2024 21:15:42 -0300 Subject: [PATCH] Rename function to collect broken links --- clippy_lints/src/doc/broken_link.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/clippy_lints/src/doc/broken_link.rs b/clippy_lints/src/doc/broken_link.rs index c0b2fc6e51cd..6e496aa78fc1 100644 --- a/clippy_lints/src/doc/broken_link.rs +++ b/clippy_lints/src/doc/broken_link.rs @@ -6,7 +6,7 @@ use rustc_span::{BytePos, Span}; use super::DOC_BROKEN_LINK; pub fn check(cx: &LateContext<'_>, attrs: &[Attribute]) { - for broken_link in BrokenLinkLoader::collect_spans_broken_link(attrs) { + for broken_link in BrokenLinkLoader::collect_broken_links(attrs) { let reason_msg = match broken_link.reason { BrokenLinkReason::MultipleLines => "broken across multiple lines", }; @@ -51,7 +51,7 @@ enum UrlState { /// Scan AST attributes looking up in doc comments for broken links /// which rustdoc won't be able to properly create link tags later. struct BrokenLinkLoader { - /// List of spans for detected broken links. + /// List of detected broken links. broken_links: Vec, state: Option, @@ -64,8 +64,8 @@ struct BrokenLinkLoader { } impl BrokenLinkLoader { - /// Return spans of broken links. - fn collect_spans_broken_link(attrs: &[Attribute]) -> Vec { + /// Return broken links. + fn collect_broken_links(attrs: &[Attribute]) -> Vec { let mut loader = BrokenLinkLoader { broken_links: vec![], state: None,