Skip to content

Commit

Permalink
chore: cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
covercash2 committed Nov 26, 2024
1 parent 86175c3 commit df99481
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
11 changes: 4 additions & 7 deletions ollama-cli/src/fs_ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,8 @@ use std::path::Path;
use crate::error::Result;

pub fn read_file_to_string(path: impl AsRef<Path>) -> Result<String> {
std::fs::read_to_string(&path)
.map_err(|source| {
crate::error::Error::ReadFile {
source,
path: path.as_ref().into()
}
})
std::fs::read_to_string(&path).map_err(|source| crate::error::Error::ReadFile {
source,
path: path.as_ref().into(),
})
}
4 changes: 1 addition & 3 deletions ollama-cli/src/tui/input/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@ pub enum TextInputEvent {
impl TextInputViewModel {
pub fn handle_action(&mut self, action: Action) -> Result<Option<TextInputEvent>> {
match action {
Action::Edit => {
return Ok(Some(TextInputEvent::InputMode(InputMode::Edit)))
}
Action::Edit => return Ok(Some(TextInputEvent::InputMode(InputMode::Edit))),
Action::Quit => return Ok(Some(TextInputEvent::Quit)),
Action::Right => self.move_cursor_right(),
Action::Left => self.move_cursor_left(),
Expand Down

0 comments on commit df99481

Please sign in to comment.