From 78c85f439f04f2aa484a9f1be3133d74bda87c7d Mon Sep 17 00:00:00 2001 From: Kyle Lin Date: Sat, 1 Jul 2023 01:29:40 +0800 Subject: fomar files --- src/librustdoc/passes/lint/redundant_explicit_links.rs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/librustdoc/passes/lint/redundant_explicit_links.rs b/src/librustdoc/passes/lint/redundant_explicit_links.rs index da8a73be60b..a41e278fd81 100644 --- a/src/librustdoc/passes/lint/redundant_explicit_links.rs +++ b/src/librustdoc/passes/lint/redundant_explicit_links.rs @@ -34,7 +34,7 @@ pub(crate) fn visit_item(cx: &DocContext<'_>, item: &Item) { if item.link_names(&cx.cache).is_empty() { // If there's no link names in this item, - // then we skip resolution querying to + // then we skip resolution querying to // avoid from panicking. return; } @@ -80,7 +80,8 @@ fn check_redundant_explicit_link<'md>( if (explicit_len >= display_len && &explicit_link[(explicit_len - display_len)..] == display_link) || (display_len >= explicit_len - && &display_link[(display_len - explicit_len)..] == explicit_link) { + && &display_link[(display_len - explicit_len)..] == explicit_link) + { match link_type { LinkType::Inline | LinkType::ReferenceUnknown => { check_inline_or_reference_unknown_redundancy( @@ -92,7 +93,11 @@ fn check_redundant_explicit_link<'md>( link_range, dest.to_string(), link_data, - if link_type == LinkType::Inline { (b'(', b')') } else { (b'[', b']') }, + if link_type == LinkType::Inline { + (b'(', b')') + } else { + (b'[', b']') + }, ); } LinkType::Reference => { @@ -110,7 +115,7 @@ fn check_redundant_explicit_link<'md>( _ => {} } } - }, + } _ => {} } } -- cgit 1.4.1-3-g733a5