Rollup merge of #56747 - ljedrz:remove_box_from_target, r=zackmdavis

target: remove Box returned by get_targets
This commit is contained in:
Pietro Albini 2018-12-15 10:17:33 +01:00 committed by GitHub
commit 3a9fa9b66a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -254,12 +254,12 @@ macro_rules! supported_targets {
}
}
pub fn get_targets() -> Box<dyn Iterator<Item=String>> {
Box::new(TARGETS.iter().filter_map(|t| -> Option<String> {
pub fn get_targets() -> impl Iterator<Item = String> {
TARGETS.iter().filter_map(|t| -> Option<String> {
load_specific(t)
.and(Ok(t.to_string()))
.ok()
}))
})
}
#[cfg(test)]