]> git.lizzy.rs Git - rust.git/blobdiff - src/librustdoc/html/markdown.rs
Auto merge of #69295 - ecstatic-morse:unified-dataflow-generators, r=tmandry
[rust.git] / src / librustdoc / html / markdown.rs
index 56f7b07cfc843f6d96b3c35ecd6816322bcb2afa..ed007fe383c1db9b98e51d2044b9ef3a4899b668 100644 (file)
@@ -707,7 +707,7 @@ fn parse(
                 x if x.starts_with("edition") => {
                     data.edition = x[7..].parse::<Edition>().ok();
                 }
-                x if allow_error_code_check && x.starts_with("E") && x.len() == 5 => {
+                x if allow_error_code_check && x.starts_with('E') && x.len() == 5 => {
                     if x[1..].parse::<u32>().is_ok() {
                         data.error_codes.push(x.to_owned());
                         seen_rust_tags = !seen_other_tags || seen_rust_tags;
@@ -738,7 +738,7 @@ pub fn to_string(self) -> String {
             return String::new();
         }
         let replacer = |_: &str, s: &str| {
-            if let Some(&(_, ref replace)) = links.into_iter().find(|link| &*link.0 == s) {
+            if let Some(&(_, ref replace)) = links.iter().find(|link| &*link.0 == s) {
                 Some((replace.clone(), s.to_owned()))
             } else {
                 None
@@ -816,7 +816,7 @@ pub fn to_string(self) -> String {
         }
 
         let replacer = |_: &str, s: &str| {
-            if let Some(&(_, ref replace)) = links.into_iter().find(|link| &*link.0 == s) {
+            if let Some(&(_, ref replace)) = links.iter().find(|link| &*link.0 == s) {
                 Some((replace.clone(), s.to_owned()))
             } else {
                 None