Skip to content

Commit

Permalink
refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
adamnemecek committed Aug 8, 2024
1 parent 301615f commit b28a874
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -248,12 +248,12 @@ pub enum BellStyle {
impl Default for BellStyle {
#[cfg(any(windows, target_arch = "wasm32"))]
fn default() -> Self {
BellStyle::None
Self::None
}

#[cfg(unix)]
fn default() -> Self {
BellStyle::Audible
Self::Audible
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/edit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ impl<'out, 'prompt, H: Helper> State<'out, 'prompt, H> {
prompt: &'prompt str,
helper: Option<&'out H>,
ctx: Context<'out>,
) -> State<'out, 'prompt, H> {
) -> Self {
let prompt_size = out.calculate_position(prompt, Position::default());
State {
Self {
out,
prompt,
prompt_size,
Expand Down
2 changes: 1 addition & 1 deletion src/undo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ impl Change {
#[cfg(test)]
fn redo(&self, line: &mut LineBuffer) {
match *self {
Self::Begin | Change::End => unreachable!(),
Self::Begin | Self::End => unreachable!(),
Self::Insert { idx, ref text } => {
line.insert_str(idx, text, &mut NoListener);
}
Expand Down

0 comments on commit b28a874

Please sign in to comment.