Skip to content

Commit

Permalink
Use impl Iterator instead of Box<dyn
Browse files Browse the repository at this point in the history
No longer needed now that this isn't part of a trait.
  • Loading branch information
ids1024 committed Sep 16, 2024
1 parent 0d6d7e6 commit 4c707b0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/input/keyboard/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,8 @@ impl Xkb {
}

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

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

0 comments on commit 4c707b0

Please sign in to comment.