diff options
author | Titus Wormer <tituswormer@gmail.com> | 2022-07-22 17:16:38 +0200 |
---|---|---|
committer | Titus Wormer <tituswormer@gmail.com> | 2022-07-22 17:16:38 +0200 |
commit | b945e43103544fc31a0755841b380358b2c161e6 (patch) | |
tree | 80c6091c4268e6fec5cce02a08cdf6fa2b434300 /build.rs | |
parent | 41fc406af206e21014eaaba94bcf6b1854f892b3 (diff) | |
download | markdown-rs-b945e43103544fc31a0755841b380358b2c161e6.tar.gz markdown-rs-b945e43103544fc31a0755841b380358b2c161e6.tar.bz2 markdown-rs-b945e43103544fc31a0755841b380358b2c161e6.zip |
Refactor to remove unneeded tuples in every states
Diffstat (limited to 'build.rs')
-rw-r--r-- | build.rs | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -26,14 +26,14 @@ async fn commonmark() { let re = Regex::new(r"(?m)(?:^`{32} example\n[\s\S]*?\n`{32}$|^#{1,6} *(.*)$)").unwrap(); let re_heading_prefix = Regex::new(r"#{1,6} ").unwrap(); let re_in_out = Regex::new(r"\n\.(?:\n|$)").unwrap(); - let mut current_heading: Option<String> = None; + let mut current_heading = None; let mut number = 1; let value = Regex::new(r"<!-- END TESTS -->[\s\S]*") .unwrap() .replace(&value, ""); let value = Regex::new(r"→").unwrap().replace_all(&value, "\t"); - let mut cases: Vec<String> = vec![]; + let mut cases = vec![]; for mat in re.find_iter(&value) { let mut lines = mat.as_str().lines().collect::<Vec<_>>(); |