clippy fixes

Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
William Casarin
2025-07-17 13:49:53 -07:00
parent a4c1b38116
commit 8a1398face
26 changed files with 51 additions and 62 deletions

View File

@@ -188,9 +188,9 @@ impl fmt::Display for ToolCallError {
match self {
ToolCallError::EmptyName => write!(f, "the tool name was empty"),
ToolCallError::EmptyArgs => write!(f, "no arguments were provided"),
ToolCallError::NotFound(ref name) => write!(f, "tool '{}' not found", name),
ToolCallError::NotFound(ref name) => write!(f, "tool '{name}' not found"),
ToolCallError::ArgParseFailure(ref msg) => {
write!(f, "failed to parse arguments: {}", msg)
write!(f, "failed to parse arguments: {msg}")
}
}
}
@@ -375,8 +375,7 @@ impl PresentNotesCall {
Ok(ToolCalls::PresentNotes(PresentNotesCall { note_ids }))
}
Err(e) => Err(ToolCallError::ArgParseFailure(format!(
"{}, error: {}",
args, e
"{args}, error: {e}"
))),
}
}
@@ -476,8 +475,7 @@ impl QueryCall {
match serde_json::from_str::<QueryCall>(args) {
Ok(call) => Ok(ToolCalls::Query(call)),
Err(e) => Err(ToolCallError::ArgParseFailure(format!(
"{}, error: {}",
args, e
"{args}, error: {e}"
))),
}
}

View File

@@ -285,7 +285,7 @@ impl<'a> DaveUi<'a> {
}
}
ToolCalls::Invalid(err) => {
ui.label(format!("invalid tool call: {:?}", err));
ui.label(format!("invalid tool call: {err:?}"));
}
ToolCalls::Query(search_call) => {
ui.allocate_ui_with_layout(