@@ -86,7 +86,7 @@ pub fn std_links(book: &mut Book) {
86
86
// Create a list of replacements to make in the raw markdown to point to the new url.
87
87
let replacements = compute_replacements ( & ch. content , & chapter_links[ key] , & ch_urls[ key] ) ;
88
88
89
- let mut new_contents = ch. content . to_string ( ) ;
89
+ let mut new_contents = ch. content . clone ( ) ;
90
90
for ( md_link, url, range) in replacements {
91
91
// Convert links to be relative so that links work offline and
92
92
// with the linkchecker.
@@ -130,7 +130,7 @@ struct Link<'a> {
130
130
}
131
131
132
132
/// 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 < ' _ > > {
134
134
let mut opts = Options :: empty ( ) ;
135
135
opts. insert ( Options :: ENABLE_TABLES ) ;
136
136
opts. insert ( Options :: ENABLE_FOOTNOTES ) ;
@@ -294,7 +294,7 @@ fn compute_replacements<'a>(
294
294
) -> Vec < ( & ' a str , & ' a str , Range < usize > ) > {
295
295
let mut replacements = Vec :: new ( ) ;
296
296
297
- for ( url, link) in urls. into_iter ( ) . zip ( links) {
297
+ for ( url, link) in urls. iter ( ) . zip ( links) {
298
298
let Some ( cap) = ANCHOR_URL . captures ( url) else {
299
299
eprintln ! ( "error: could not find anchor in:\n {url}\n link={link:#?}" ) ;
300
300
process:: exit ( 1 ) ;
0 commit comments