Skip to content

Commit 08d31e1

Browse files
ids1024Drakulix
authored andcommitted
Use impl Iterator instead of Box<dyn
No longer needed now that this isn't part of a trait.
1 parent 3293482 commit 08d31e1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/input/keyboard/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,8 @@ impl Xkb {
177177
}
178178

179179
/// Iterate over layouts present in the keymap.
180-
pub fn layouts(&self) -> Box<dyn Iterator<Item = Layout>> {
181-
Box::new((0..self.keymap.num_layouts()).map(Layout))
180+
pub fn layouts(&self) -> impl Iterator<Item = Layout> {
181+
(0..self.keymap.num_layouts()).map(Layout)
182182
}
183183

184184
/// Returns the syms for the underlying keycode without any modifications by the current keymap

0 commit comments

Comments
 (0)