Skip to content

Commit

Permalink
misc: Fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
artempyanykh committed Jul 6, 2024
1 parent dd52cb0 commit 4a0874a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/keys.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ impl<C: Clone + 'static> ModeMap<C> {
let binding = Binding::new(combo, act, desc);
self.map
.entry(mode.into())
.or_insert_with(Vec::new)
.or_default()
.push(Box::new(binding));
}

Expand All @@ -106,7 +106,7 @@ impl<C: Clone + 'static> ModeMap<C> {

self.map
.entry(mode.into())
.or_insert_with(Vec::new)
.or_default()
.push(Box::new(binding));
}

Expand Down
8 changes: 3 additions & 5 deletions src/shell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,16 @@ impl<A: Output> Output for Option<A> {
pub const OUTPUT_TYPES_STR: &[&str] = &["plain", "posix", "fish", "powershell"];

#[derive(Parser)]
#[derive(Default)]
pub enum OutputType {
#[default]
Plain,
Posix,
Fish,
PowerShell,
}

impl Default for OutputType {
fn default() -> Self {
OutputType::Plain
}
}


impl OutputType {
pub const fn to_str(&self) -> &'static str {
Expand Down

0 comments on commit 4a0874a

Please sign in to comment.