Simplify an Iterator::fold to Iterator::any

This commit is contained in:
Oliver Schneider 2017-11-20 12:46:45 +01:00
parent eb44c89641
commit 7e07fd3e8d
No known key found for this signature in database
GPG Key ID: A69F8D225B3AD7D9

View File

@ -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 {