Skip to content

Commit

Permalink
Use Default trait for PathMode constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
jmacdonald committed Apr 8, 2024
1 parent f0ceb78 commit 48bab5e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/models/application/modes/path.rs
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
use std::fmt;

#[derive(Default)]
pub struct PathMode {
pub input: String,
pub save_on_accept: bool,
}

impl PathMode {
pub fn new() -> PathMode {
PathMode {
input: String::new(),
save_on_accept: false,
}
PathMode::default()
}

pub fn push_char(&mut self, c: char) {
Expand Down

0 comments on commit 48bab5e

Please sign in to comment.