diff --git a/components/site/src/link_checking.rs b/components/site/src/link_checking.rs index 1bb1a66941..c7e4678195 100644 --- a/components/site/src/link_checking.rs +++ b/components/site/src/link_checking.rs @@ -178,13 +178,15 @@ pub fn check_external_links(site: &Site) -> Vec { } } + // Get unique links count from Vec by creating a temporary HashSet. + let unique_links_count = HashSet::<&str>::from_iter( + checked_links.iter().map(|link_def| link_def.external_link.as_str()), + ) + .len(); + println!( "Checking {} external link(s). Skipping {} external link(s).{}", - // Get unique links count from Vec by creating a temporary HashSet. - HashSet::<&str>::from_iter( - checked_links.iter().map(|link_def| link_def.external_link.as_str()) - ) - .len(), + unique_links_count, skipped_link_count, if invalid_url_links == 0 { "".to_string() @@ -272,7 +274,7 @@ pub fn check_external_links(site: &Site) -> Vec { println!( "> Checked {} external link(s): {} error(s) found.", - checked_links.len(), + unique_links_count, errors.len() );