diff --git a/ollama-cli/src/fs_ext.rs b/ollama-cli/src/fs_ext.rs index 424449f..b02fb8c 100644 --- a/ollama-cli/src/fs_ext.rs +++ b/ollama-cli/src/fs_ext.rs @@ -3,11 +3,8 @@ use std::path::Path; use crate::error::Result; pub fn read_file_to_string(path: impl AsRef) -> Result { - 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(), + }) } diff --git a/ollama-cli/src/tui/input/mod.rs b/ollama-cli/src/tui/input/mod.rs index 93eeea6..897bfdb 100644 --- a/ollama-cli/src/tui/input/mod.rs +++ b/ollama-cli/src/tui/input/mod.rs @@ -31,9 +31,7 @@ pub enum TextInputEvent { impl TextInputViewModel { pub fn handle_action(&mut self, action: Action) -> Result> { 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(),