From 2b41b6d022fa90e44a89ed6d0aecb77de8fd5505 Mon Sep 17 00:00:00 2001 From: Caleb Cartwright Date: Wed, 20 Oct 2021 00:11:59 -0500 Subject: Merge commit 'efa8f5521d3813cc897ba29ea0ef98c7aef66bb6' into rustfmt-subtree --- src/test/mod.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/test') 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 { 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| { ( -- cgit 1.4.1-3-g733a5