Skip to content

Commit 20b36f4

Browse files
authored
Rollup merge of rust-lang#56747 - ljedrz:remove_box_from_target, r=zackmdavis
target: remove Box returned by get_targets
2 parents 33ba9ac + 29bec2d commit 20b36f4

File tree

1 file changed

+3
-3
lines changed
  • src/librustc_target/spec

1 file changed

+3
-3
lines changed

src/librustc_target/spec/mod.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -254,12 +254,12 @@ macro_rules! supported_targets {
254254
}
255255
}
256256

257-
pub fn get_targets() -> Box<dyn Iterator<Item=String>> {
258-
Box::new(TARGETS.iter().filter_map(|t| -> Option<String> {
257+
pub fn get_targets() -> impl Iterator<Item = String> {
258+
TARGETS.iter().filter_map(|t| -> Option<String> {
259259
load_specific(t)
260260
.and(Ok(t.to_string()))
261261
.ok()
262-
}))
262+
})
263263
}
264264

265265
#[cfg(test)]

0 commit comments

Comments
 (0)