Skip to content

Commit 29bec2d

Browse files
committed
target: remove Box returned from get_targets
1 parent ae3833d commit 29bec2d

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)