@@ -86,7 +86,7 @@ pub fn std_links(book: &mut Book) {
8686 // Create a list of replacements to make in the raw markdown to point to the new url.
8787 let replacements = compute_replacements ( & ch. content , & chapter_links[ key] , & ch_urls[ key] ) ;
8888
89- let mut new_contents = ch. content . to_string ( ) ;
89+ let mut new_contents = ch. content . clone ( ) ;
9090 for ( md_link, url, range) in replacements {
9191 // Convert links to be relative so that links work offline and
9292 // with the linkchecker.
@@ -130,7 +130,7 @@ struct Link<'a> {
130130}
131131
132132/// Collects all markdown links that look like they might be standard library links.
133- fn collect_markdown_links < ' a > ( chapter : & ' a Chapter ) -> Vec < Link < ' a > > {
133+ fn collect_markdown_links ( chapter : & Chapter ) -> Vec < Link < ' _ > > {
134134 let mut opts = Options :: empty ( ) ;
135135 opts. insert ( Options :: ENABLE_TABLES ) ;
136136 opts. insert ( Options :: ENABLE_FOOTNOTES ) ;
@@ -294,7 +294,7 @@ fn compute_replacements<'a>(
294294) -> Vec < ( & ' a str , & ' a str , Range < usize > ) > {
295295 let mut replacements = Vec :: new ( ) ;
296296
297- for ( url, link) in urls. into_iter ( ) . zip ( links) {
297+ for ( url, link) in urls. iter ( ) . zip ( links) {
298298 let Some ( cap) = ANCHOR_URL . captures ( url) else {
299299 eprintln ! ( "error: could not find anchor in:\n {url}\n link={link:#?}" ) ;
300300 process:: exit ( 1 ) ;
0 commit comments