From 7e07fd3e8d83b5feec2d6c3e5fb57de73681a9f3 Mon Sep 17 00:00:00 2001 From: Oliver Schneider Date: Mon, 20 Nov 2017 12:46:45 +0100 Subject: Simplify an Iterator::fold to Iterator::any --- src/tools/compiletest/src/runtest.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/tools/compiletest') diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs index 1fd48881ba2..73ed77a6887 100644 --- a/src/tools/compiletest/src/runtest.rs +++ b/src/tools/compiletest/src/runtest.rs @@ -1370,7 +1370,7 @@ actual:\n\ // Optionally prevent default --target if specified in test compile-flags. let custom_target = self.props.compile_flags .iter() - .fold(false, |acc, x| acc || x.starts_with("--target")); + .any(|x| x.starts_with("--target")); if !custom_target { let target = if self.props.force_host { -- cgit 1.4.1-3-g733a5