about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorCaleb Cartwright <caleb.cartwright@outlook.com>2021-10-20 00:11:59 -0500
committerCaleb Cartwright <caleb.cartwright@outlook.com>2021-10-20 00:11:59 -0500
commit2b41b6d022fa90e44a89ed6d0aecb77de8fd5505 (patch)
tree5bf4e2af8a23a19986725aa6ac2095ae1c81fbd1 /src/test
parent9060bc5583f80a37530ee35a6cc2ddf1293d068f (diff)
Merge commit 'efa8f5521d3813cc897ba29ea0ef98c7aef66bb6' into rustfmt-subtree
Diffstat (limited to 'src/test')
-rw-r--r--src/test/mod.rs7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/test/mod.rs b/src/test/mod.rs
index cb52346a13a..48d61289a9b 100644
--- a/src/test/mod.rs
+++ b/src/test/mod.rs
@@ -469,11 +469,6 @@ fn stdin_works_with_modified_lines() {
 #[test]
 fn stdin_disable_all_formatting_test() {
     init_log();
-    match option_env!("CFG_RELEASE_CHANNEL") {
-        None | Some("nightly") => {}
-        // These tests require nightly.
-        _ => return,
-    }
     let input = String::from("fn main() { println!(\"This should not be formatted.\"); }");
     let mut child = Command::new(rustfmt().to_str().unwrap())
         .stdin(Stdio::piped())
@@ -694,7 +689,7 @@ fn read_significant_comments(file_name: &Path) -> HashMap<String, String> {
     reader
         .lines()
         .map(|line| line.expect("failed getting line"))
-        .take_while(|line| line_regex.is_match(line))
+        .filter(|line| line_regex.is_match(line))
         .filter_map(|line| {
             regex.captures_iter(&line).next().map(|capture| {
                 (