diff options
| author | Ellie Huxtable <ellie@atuin.sh> | 2026-04-21 02:34:35 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-04-21 02:34:35 +0100 |
| commit | 65b74277d1f113174ad52cae9ffa93fbef1dc705 (patch) | |
| tree | 0529b72020207036fe246088ee440944fc24af99 | |
| parent | chore(release): prepare for release 18.15.2 (#3421) (diff) | |
| download | atuin-65b74277d1f113174ad52cae9ffa93fbef1dc705.zip | |
chore: update to rust 1.95 (#3426)
<!-- Thank you for making a PR! Bug fixes are always welcome, but if
you're adding a new feature or changing an existing one, we'd really
appreciate if you open an issue, post on the forum, or drop in on
Discord -->
## Checks
- [ ] I am happy for maintainers to push small adjustments to this PR,
to speed up the review cycle
- [ ] I have checked that there are no existing pull requests for the
same thing
| -rw-r--r-- | .github/workflows/rust.yml | 12 | ||||
| -rw-r--r-- | Cargo.toml | 2 | ||||
| -rw-r--r-- | Dockerfile | 2 | ||||
| -rw-r--r-- | crates/atuin-ai/src/commands/inline.rs | 6 | ||||
| -rw-r--r-- | crates/atuin-ai/src/tui/components/markdown.rs | 8 | ||||
| -rw-r--r-- | crates/atuin-history/src/stats.rs | 26 | ||||
| -rw-r--r-- | crates/atuin/src/command/client/doctor.rs | 3 | ||||
| -rw-r--r-- | crates/atuin/src/command/client/dotfiles/alias.rs | 4 | ||||
| -rw-r--r-- | crates/atuin/src/command/client/dotfiles/var.rs | 4 | ||||
| -rw-r--r-- | crates/atuin/src/command/client/import.rs | 2 | ||||
| -rw-r--r-- | crates/atuin/src/command/client/search/inspector.rs | 2 | ||||
| -rw-r--r-- | crates/atuin/src/command/client/search/interactive.rs | 2 | ||||
| -rw-r--r-- | crates/atuin/src/command/client/wrapped.rs | 2 | ||||
| -rw-r--r-- | flake.nix | 2 | ||||
| -rw-r--r-- | rust-toolchain.toml | 2 |
15 files changed, 34 insertions, 45 deletions
diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index a215888f..536df2a6 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -26,7 +26,7 @@ jobs: - name: Install rust uses: dtolnay/rust-toolchain@master with: - toolchain: 1.94.0 + toolchain: 1.95.0 - uses: actions/cache@v5 with: @@ -97,7 +97,7 @@ jobs: - name: Install rust uses: dtolnay/rust-toolchain@master with: - toolchain: 1.94.0 + toolchain: 1.95.0 - uses: taiki-e/install-action@v2 name: Install nextest @@ -127,7 +127,7 @@ jobs: - name: Install rust uses: dtolnay/rust-toolchain@master with: - toolchain: 1.94.0 + toolchain: 1.95.0 - uses: actions/cache@v5 with: @@ -171,7 +171,7 @@ jobs: - name: Install rust uses: dtolnay/rust-toolchain@master with: - toolchain: 1.94.0 + toolchain: 1.95.0 - uses: taiki-e/install-action@v2 name: Install nextest @@ -200,7 +200,7 @@ jobs: - name: Install latest rust uses: dtolnay/rust-toolchain@master with: - toolchain: 1.94.0 + toolchain: 1.95.0 components: clippy - uses: actions/cache@v5 @@ -223,7 +223,7 @@ jobs: - name: Install latest rust uses: dtolnay/rust-toolchain@master with: - toolchain: 1.94.0 + toolchain: 1.95.0 components: rustfmt - name: Format @@ -11,7 +11,7 @@ exclude = ["ui/backend", "crates/atuin-nucleo/matcher/fuzz"] [workspace.package] version = "18.15.2" authors = ["Ellie Huxtable <ellie@atuin.sh>"] -rust-version = "1.94.0" +rust-version = "1.95.0" license = "MIT" homepage = "https://atuin.sh" repository = "https://github.com/atuinsh/atuin" @@ -1,4 +1,4 @@ -FROM lukemathwalker/cargo-chef:latest-rust-1.94.0-slim-bookworm AS chef +FROM lukemathwalker/cargo-chef:latest-rust-1.95.0-slim-bookworm AS chef WORKDIR app FROM chef AS planner diff --git a/crates/atuin-ai/src/commands/inline.rs b/crates/atuin-ai/src/commands/inline.rs index 6d9628ea..b7aae51f 100644 --- a/crates/atuin-ai/src/commands/inline.rs +++ b/crates/atuin-ai/src/commands/inline.rs @@ -326,10 +326,8 @@ fn prompt_ai_setup() -> Result<SetupChoice> { KeyCode::Up | KeyCode::Char('k') => { selected = selected.saturating_sub(1); } - KeyCode::Down | KeyCode::Char('j') => { - if selected < options.len() - 1 { - selected += 1; - } + KeyCode::Down | KeyCode::Char('j') if selected < options.len() - 1 => { + selected += 1; } KeyCode::Enter => break, KeyCode::Esc => { diff --git a/crates/atuin-ai/src/tui/components/markdown.rs b/crates/atuin-ai/src/tui/components/markdown.rs index f164fdc5..607520b7 100644 --- a/crates/atuin-ai/src/tui/components/markdown.rs +++ b/crates/atuin-ai/src/tui/components/markdown.rs @@ -196,11 +196,9 @@ fn parse_markdown<'a>(source: &'a str, styles: &'a MarkdownStyles) -> Text<'stat Event::End(TagEnd::Item) => { in_list_item = false; } - Event::Start(Tag::List(_)) => { - if current_line > 0 || !lines[0].is_empty() { - current_line += 1; - lines.push(Vec::new()); - } + Event::Start(Tag::List(_)) if current_line > 0 || !lines[0].is_empty() => { + current_line += 1; + lines.push(Vec::new()); } Event::End(TagEnd::List(_)) => {} _ => {} diff --git a/crates/atuin-history/src/stats.rs b/crates/atuin-history/src/stats.rs index 8bf03e42..fedb1487 100644 --- a/crates/atuin-history/src/stats.rs +++ b/crates/atuin-history/src/stats.rs @@ -79,25 +79,19 @@ fn split_at_pipe(command: &str) -> Vec<&str> { while let Some((i, c)) = graphemes.next() { let current = i; match c { - "\"" => { - if command[start..current] != *"\"" { - quoted = !quoted; - } + "\"" if command[start..current] != *"\"" => { + quoted = !quoted; } - "'" => { - if command[start..current] != *"'" { - quoted = !quoted; - } + "'" if command[start..current] != *"'" => { + quoted = !quoted; } - "\\" => if graphemes.next().is_some() {}, - "|" => { - if !quoted { - if current > start && command[start..].starts_with('|') { - start += 1; - } - result.push(&command[start..current]); - start = current; + "\\" if graphemes.next().is_some() => {} + "|" if !quoted => { + if current > start && command[start..].starts_with('|') { + start += 1; } + result.push(&command[start..current]); + start = current; } _ => {} } diff --git a/crates/atuin/src/command/client/doctor.rs b/crates/atuin/src/command/client/doctor.rs index eea302b8..ce65f66a 100644 --- a/crates/atuin/src/command/client/doctor.rs +++ b/crates/atuin/src/command/client/doctor.rs @@ -255,8 +255,7 @@ impl SyncInfo { .await .ok() .flatten() - .filter(|t| t.starts_with("atapi_")) - .is_some(), + .is_some_and(|t| t.starts_with("atapi_")), None => false, }; let has_cli_token = match &meta { diff --git a/crates/atuin/src/command/client/dotfiles/alias.rs b/crates/atuin/src/command/client/dotfiles/alias.rs index 983c67f1..61f8601d 100644 --- a/crates/atuin/src/command/client/dotfiles/alias.rs +++ b/crates/atuin/src/command/client/dotfiles/alias.rs @@ -95,10 +95,10 @@ impl Cmd { // Apply sorting match sort_by { SortBy::Name => { - aliases.sort_by(|a, b| a.name.to_lowercase().cmp(&b.name.to_lowercase())); + aliases.sort_by_key(|a| a.name.to_lowercase()); } SortBy::Value => { - aliases.sort_by(|a, b| a.value.to_lowercase().cmp(&b.value.to_lowercase())); + aliases.sort_by_key(|a| a.value.to_lowercase()); } } diff --git a/crates/atuin/src/command/client/dotfiles/var.rs b/crates/atuin/src/command/client/dotfiles/var.rs index a63231ec..94f75d57 100644 --- a/crates/atuin/src/command/client/dotfiles/var.rs +++ b/crates/atuin/src/command/client/dotfiles/var.rs @@ -111,10 +111,10 @@ impl Cmd { // Apply sorting match sort_by { SortBy::Name => { - vars.sort_by(|a, b| a.name.to_lowercase().cmp(&b.name.to_lowercase())); + vars.sort_by_key(|a| a.name.to_lowercase()); } SortBy::Value => { - vars.sort_by(|a, b| a.value.to_lowercase().cmp(&b.value.to_lowercase())); + vars.sort_by_key(|a| a.value.to_lowercase()); } } diff --git a/crates/atuin/src/command/client/import.rs b/crates/atuin/src/command/client/import.rs index 4df14ce8..88c9dfff 100644 --- a/crates/atuin/src/command/client/import.rs +++ b/crates/atuin/src/command/client/import.rs @@ -78,7 +78,7 @@ impl Cmd { let shell = env::var("SHELL").unwrap_or_else(|_| String::from("NO_SHELL")); if xonsh_histfile.to_lowercase().ends_with(".json") { - println!("Detected Xonsh",); + println!("Detected Xonsh"); import::<Xonsh, DB>(db).await } else if xonsh_histfile.to_lowercase().ends_with(".sqlite") { println!("Detected Xonsh (SQLite backend)"); diff --git a/crates/atuin/src/command/client/search/inspector.rs b/crates/atuin/src/command/client/search/inspector.rs index 151e1354..a6e2edf0 100644 --- a/crates/atuin/src/command/client/search/inspector.rs +++ b/crates/atuin/src/command/client/search/inspector.rs @@ -183,7 +183,7 @@ fn sort_duration_over_time(durations: &[(String, i64)]) -> Vec<(String, i64)> { }) .collect(); - durations.sort_by(|a, b| a.0.cmp(&b.0)); + durations.sort_by_key(|a| a.0); durations .iter() diff --git a/crates/atuin/src/command/client/search/interactive.rs b/crates/atuin/src/command/client/search/interactive.rs index ee38ddaa..4464bf22 100644 --- a/crates/atuin/src/command/client/search/interactive.rs +++ b/crates/atuin/src/command/client/search/interactive.rs @@ -1208,7 +1208,7 @@ impl State { let mode_width = usize::from(prefix_width) - pref.len() - 3; // sanity check to ensure we don't exceed the layout limits debug_assert!(mode_width >= mode.len(), "mode name '{mode}' is too long!"); - let input = format!("[{pref}{mode:^mode_width$}] {}", self.search.input.as_str(),); + let input = format!("[{pref}{mode:^mode_width$}] {}", self.search.input.as_str()); let input = Paragraph::new(input); match style.compactness { Compactness::Full => { diff --git a/crates/atuin/src/command/client/wrapped.rs b/crates/atuin/src/command/client/wrapped.rs index 20b79a2e..8d2b5e51 100644 --- a/crates/atuin/src/command/client/wrapped.rs +++ b/crates/atuin/src/command/client/wrapped.rs @@ -267,7 +267,7 @@ fn print_fun_facts(wrapped_stats: &WrappedStats, stats: &Stats, year: i32) { // Time patterns if let Some((hour, count)) = &wrapped_stats.busiest_hour { - println!("\nš Most Productive Hour: {bold}{hour}{reset} ({count} commands)",); + println!("\nš Most Productive Hour: {bold}{hour}{reset} ({count} commands)"); // Night owl or early bird let hour_num = hour @@ -31,7 +31,7 @@ fenix.packages.${system}.fromToolchainFile { file = ./rust-toolchain.toml; - sha256 = "sha256-qqF33vNuAdU5vua96VKVIwuc43j4EFeEXbjQ6+l4mO4="; + sha256 = "sha256-gh/xTkxKHL4eiRXzWv8KP7vfjSk61Iq48x47BEDFgfk="; }; in pkgs.makeRustPlatform { diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 76a06e6b..f25b5b14 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,2 +1,2 @@ [toolchain] -channel = "1.94.0" +channel = "1.95.0" |
