Fix cargo fmt formatting issues (#1)

This commit is contained in:
Hunter Bown
2026-01-20 11:48:08 -06:00
parent b8d477f751
commit 197e5dd441
2 changed files with 9 additions and 15 deletions
+5 -14
View File
@@ -1,8 +1,8 @@
//! Note command: append to persistent notes file
use crate::tui::app::App;
use std::fs;
use std::io::Write;
use crate::tui::app::App;
use super::CommandResult;
@@ -25,9 +25,7 @@ pub fn note(app: &mut App, content: Option<&str>) -> CommandResult {
// Ensure parent directory exists
if let Some(parent) = notes_path.parent() {
if let Err(e) = fs::create_dir_all(parent) {
return CommandResult::error(format!(
"Failed to create notes directory: {e}"
));
return CommandResult::error(format!("Failed to create notes directory: {e}"));
}
}
@@ -39,21 +37,14 @@ pub fn note(app: &mut App, content: Option<&str>) -> CommandResult {
{
Ok(f) => f,
Err(e) => {
return CommandResult::error(format!(
"Failed to open notes file: {e}"
));
return CommandResult::error(format!("Failed to open notes file: {e}"));
}
};
// Write separator and note content
if let Err(e) = writeln!(file, "\n---\n{}", note_content) {
return CommandResult::error(format!(
"Failed to write note: {e}"
));
return CommandResult::error(format!("Failed to write note: {e}"));
}
CommandResult::message(format!(
"Note appended to {}",
notes_path.display()
))
CommandResult::message(format!("Note appended to {}", notes_path.display()))
}
+4 -1
View File
@@ -186,7 +186,10 @@ impl Settings {
vec![
("theme", "Color theme: default, dark, light"),
("auto_compact", "Auto-compact conversations: on/off"),
("auto_rlm", "Auto-switch to RLM mode for large inputs: on/off"),
(
"auto_rlm",
"Auto-switch to RLM mode for large inputs: on/off",
),
("show_thinking", "Show model thinking: on/off"),
("show_tool_details", "Show detailed tool output: on/off"),
("default_mode", "Default mode: agent, plan, yolo, rlm, duo"),