target: remove Box returned from get_targets

This commit is contained in:
ljedrz 2018-12-12 16:04:03 +01:00
parent ae3833db3b
commit 29bec2dfc2

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)]