Skip to content

Commit

Permalink
Merge pull request #662 from gwenn/clippy
Browse files Browse the repository at this point in the history
Fix clippy warnings
  • Loading branch information
gwenn authored Jan 14, 2023
2 parents ae70c0b + 9ac0450 commit d93a6b7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
9 changes: 2 additions & 7 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -292,10 +292,11 @@ pub enum ColorMode {
}

/// Should the editor use stdio
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq)]
#[non_exhaustive]
pub enum Behavior {
/// Use stdin / stdout
#[default]
Stdio,
/// Use terminal-style interaction whenever possible, even if 'stdin' and/or
/// 'stdout' are not terminals.
Expand All @@ -305,12 +306,6 @@ pub enum Behavior {
// useFile
}

impl Default for Behavior {
fn default() -> Self {
Behavior::Stdio
}
}

/// Configuration builder
#[derive(Clone, Debug, Default)]
pub struct Builder {
Expand Down
9 changes: 2 additions & 7 deletions src/line_buffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,13 @@ pub enum WordAction {
}

/// Delete (kill) direction
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[derive(Debug, Default, Clone, Copy, PartialEq, Eq)]
pub(crate) enum Direction {
#[default]
Forward,
Backward,
}

impl Default for Direction {
fn default() -> Self {
Direction::Forward
}
}

/// Listener to be notified when some text is deleted.
pub(crate) trait DeleteListener {
fn start_killing(&mut self);
Expand Down

0 comments on commit d93a6b7

Please sign in to comment.