chore(rs): update dependencies (#1494)
### Chores - Update cargo dependencies - Remove unused cargo dependencies - Fix clippy warnings - Update Dockerfile (package.json requires node 22) - Let Dependabot update bun, cargo, devcontainers, docker, github-actions, npm (nix still not supported) ### TODO - Upgrade dependencies with breaking changes ```shell $ cargo update --verbose Unchanged crossterm v0.28.1 (available: v0.29.0) Unchanged schemars v0.8.22 (available: v1.0.4) ```
This commit is contained in:
@@ -678,8 +678,7 @@ mod tests {
|
||||
let result = ChatComposer::current_at_token(&textarea);
|
||||
assert_eq!(
|
||||
result, expected,
|
||||
"Failed for case: {} - input: '{}', cursor: {}",
|
||||
description, input, cursor_pos
|
||||
"Failed for case: {description} - input: '{input}', cursor: {cursor_pos}"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ pub(crate) fn get_git_diff() -> io::Result<(bool, String)> {
|
||||
}
|
||||
}
|
||||
|
||||
Ok((true, format!("{}{}", tracked_diff, untracked_diff)))
|
||||
Ok((true, format!("{tracked_diff}{untracked_diff}")))
|
||||
}
|
||||
|
||||
/// Helper that executes `git` with the given `args` and returns `stdout` as a
|
||||
|
||||
@@ -140,7 +140,7 @@ impl HistoryCell {
|
||||
Line::from(vec![
|
||||
"OpenAI ".into(),
|
||||
"Codex".bold(),
|
||||
format!(" v{}", VERSION).into(),
|
||||
format!(" v{VERSION}").into(),
|
||||
" (research preview)".dim(),
|
||||
]),
|
||||
Line::from(""),
|
||||
@@ -185,7 +185,7 @@ impl HistoryCell {
|
||||
let lines = vec![
|
||||
Line::from("model changed:".magenta().bold()),
|
||||
Line::from(format!("requested: {}", config.model)),
|
||||
Line::from(format!("used: {}", model)),
|
||||
Line::from(format!("used: {model}")),
|
||||
Line::from(""),
|
||||
];
|
||||
HistoryCell::SessionInfo {
|
||||
@@ -276,7 +276,7 @@ impl HistoryCell {
|
||||
}
|
||||
let remaining = lines_iter.count();
|
||||
if remaining > 0 {
|
||||
lines.push(Line::from(format!("... {} additional lines", remaining)).dim());
|
||||
lines.push(Line::from(format!("... {remaining} additional lines")).dim());
|
||||
}
|
||||
lines.push(Line::from(""));
|
||||
|
||||
|
||||
@@ -216,8 +216,7 @@ fn run_ratatui_app(
|
||||
fn restore() {
|
||||
if let Err(err) = tui::restore() {
|
||||
eprintln!(
|
||||
"failed to restore terminal. Run `reset` or restart your terminal to recover: {}",
|
||||
err
|
||||
"failed to restore terminal. Run `reset` or restart your terminal to recover: {err}"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ where
|
||||
|
||||
impl Visit for Visitor<'_> {
|
||||
fn record_debug(&mut self, _field: &Field, value: &dyn std::fmt::Debug) {
|
||||
let _ = write!(self.buf, " {:?}", value);
|
||||
let _ = write!(self.buf, " {value:?}");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@ pub(crate) fn truncate_text(text: &str, max_graphemes: usize) -> String {
|
||||
let mut truncate_graphemes = text.grapheme_indices(true);
|
||||
if let Some((truncate_byte_index, _)) = truncate_graphemes.nth(max_graphemes - 3) {
|
||||
let truncated = &text[..truncate_byte_index];
|
||||
format!("{}...", truncated)
|
||||
format!("{truncated}...")
|
||||
} else {
|
||||
text.to_string()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user