Skip to content

Commit

Permalink
Fix nightly formatting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
mfontanini committed Oct 8, 2023
1 parent 52aeee6 commit 52ec154
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 15 deletions.
6 changes: 1 addition & 5 deletions src/input/user.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,7 @@ pub struct UserInput {

impl UserInput {
pub fn poll_next_command(&mut self, timeout: Duration) -> io::Result<Option<UserCommand>> {
if poll(timeout)? {
self.next_command()
} else {
Ok(None)
}
if poll(timeout)? { self.next_command() } else { Ok(None) }
}

pub fn next_command(&mut self) -> io::Result<Option<UserCommand>> {
Expand Down
12 changes: 2 additions & 10 deletions src/slideshow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,7 @@ impl<'a> SlideShow<'a> {
};
// If the screen is too small, simply ignore this. Eventually the user will resize the
// screen.
if matches!(result, Err(RenderError::TerminalTooSmall)) {
Ok(())
} else {
result
}
if matches!(result, Err(RenderError::TerminalTooSmall)) { Ok(()) } else { result }
}

fn apply_user_command(&mut self, command: UserCommand) -> CommandSideEffect {
Expand All @@ -107,11 +103,7 @@ impl<'a> SlideShow<'a> {
UserCommand::JumpSlide(number) => presentation.jump_slide(number.saturating_sub(1) as usize),
UserCommand::Exit => return CommandSideEffect::Exit,
};
if needs_redraw {
CommandSideEffect::Redraw
} else {
CommandSideEffect::None
}
if needs_redraw { CommandSideEffect::Redraw } else { CommandSideEffect::None }
}

fn try_reload(&mut self, path: &Path) {
Expand Down

0 comments on commit 52ec154

Please sign in to comment.