Skip to content

Commit

Permalink
Rename function to collect broken links
Browse files Browse the repository at this point in the history
  • Loading branch information
maxcnunes committed Nov 19, 2024
1 parent 53c2aaa commit 2e8f2dc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions clippy_lints/src/doc/broken_link.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
};
Expand Down Expand Up @@ -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<BrokenLink>,

state: Option<State>,
Expand All @@ -64,8 +64,8 @@ struct BrokenLinkLoader {
}

impl BrokenLinkLoader {
/// Return spans of broken links.
fn collect_spans_broken_link(attrs: &[Attribute]) -> Vec<BrokenLink> {
/// Return broken links.
fn collect_broken_links(attrs: &[Attribute]) -> Vec<BrokenLink> {
let mut loader = BrokenLinkLoader {
broken_links: vec![],
state: None,
Expand Down

0 comments on commit 2e8f2dc

Please sign in to comment.