From 639a6fd2f39d45b995213118c21b63853e519f13 Mon Sep 17 00:00:00 2001 From: Michael Bolin Date: Wed, 24 Sep 2025 08:32:00 -0700 Subject: [PATCH] chore: upgrade to Rust 1.90 (#4124) Inspired by Dependabot's attempt to do this: https://github.com/openai/codex/pull/4029 The new version of Clippy found some unused structs that are removed in this PR. Though nothing stood out to me in the Release Notes in terms of things we should start to take advantage of: https://blog.rust-lang.org/2025/09/18/Rust-1.90.0/. --- .github/workflows/rust-ci.yml | 6 +++--- .github/workflows/rust-release.yml | 2 +- codex-rs/core/src/client.rs | 3 --- codex-rs/core/src/rollout/recorder.rs | 16 ---------------- codex-rs/core/src/tool_apply_patch.rs | 5 ----- codex-rs/rust-toolchain.toml | 4 ++-- 6 files changed, 6 insertions(+), 30 deletions(-) diff --git a/.github/workflows/rust-ci.yml b/.github/workflows/rust-ci.yml index 280939c6..846408f3 100644 --- a/.github/workflows/rust-ci.yml +++ b/.github/workflows/rust-ci.yml @@ -57,7 +57,7 @@ jobs: working-directory: codex-rs steps: - uses: actions/checkout@v5 - - uses: dtolnay/rust-toolchain@1.89 + - uses: dtolnay/rust-toolchain@1.90 with: components: rustfmt - name: cargo fmt @@ -75,7 +75,7 @@ jobs: working-directory: codex-rs steps: - uses: actions/checkout@v5 - - uses: dtolnay/rust-toolchain@1.89 + - uses: dtolnay/rust-toolchain@1.90 - uses: taiki-e/install-action@0c5db7f7f897c03b771660e91d065338615679f4 # v2 with: tool: cargo-shear @@ -143,7 +143,7 @@ jobs: steps: - uses: actions/checkout@v5 - - uses: dtolnay/rust-toolchain@1.89 + - uses: dtolnay/rust-toolchain@1.90 with: targets: ${{ matrix.target }} components: clippy diff --git a/.github/workflows/rust-release.yml b/.github/workflows/rust-release.yml index 29e4a4c7..c808216d 100644 --- a/.github/workflows/rust-release.yml +++ b/.github/workflows/rust-release.yml @@ -77,7 +77,7 @@ jobs: steps: - uses: actions/checkout@v5 - - uses: dtolnay/rust-toolchain@1.89 + - uses: dtolnay/rust-toolchain@1.90 with: targets: ${{ matrix.target }} diff --git a/codex-rs/core/src/client.rs b/codex-rs/core/src/client.rs index 0ae057b3..e088f9c3 100644 --- a/codex-rs/core/src/client.rs +++ b/codex-rs/core/src/client.rs @@ -415,9 +415,6 @@ struct SseEvent { delta: Option, } -#[derive(Debug, Deserialize)] -struct ResponseCreated {} - #[derive(Debug, Deserialize)] struct ResponseCompleted { id: String, diff --git a/codex-rs/core/src/rollout/recorder.rs b/codex-rs/core/src/rollout/recorder.rs index 6befdb1f..23e64541 100644 --- a/codex-rs/core/src/rollout/recorder.rs +++ b/codex-rs/core/src/rollout/recorder.rs @@ -7,8 +7,6 @@ use std::path::Path; use std::path::PathBuf; use codex_protocol::mcp_protocol::ConversationId; -use serde::Deserialize; -use serde::Serialize; use serde_json::Value; use time::OffsetDateTime; use time::format_description::FormatItem; @@ -28,7 +26,6 @@ use super::policy::is_persisted_response_item; use crate::config::Config; use crate::default_client::ORIGINATOR; use crate::git_info::collect_git_info; -use codex_protocol::models::ResponseItem; use codex_protocol::protocol::InitialHistory; use codex_protocol::protocol::ResumedHistory; use codex_protocol::protocol::RolloutItem; @@ -36,19 +33,6 @@ use codex_protocol::protocol::RolloutLine; use codex_protocol::protocol::SessionMeta; use codex_protocol::protocol::SessionMetaLine; -#[derive(Serialize, Deserialize, Default, Clone)] -pub struct SessionStateSnapshot {} - -#[derive(Serialize, Deserialize, Default, Clone)] -pub struct SavedSession { - pub session: SessionMeta, - #[serde(default)] - pub items: Vec, - #[serde(default)] - pub state: SessionStateSnapshot, - pub session_id: ConversationId, -} - /// Records all [`ResponseItem`]s for a session and flushes them to disk after /// every update. /// diff --git a/codex-rs/core/src/tool_apply_patch.rs b/codex-rs/core/src/tool_apply_patch.rs index d4039fd1..164a1e12 100644 --- a/codex-rs/core/src/tool_apply_patch.rs +++ b/codex-rs/core/src/tool_apply_patch.rs @@ -10,11 +10,6 @@ use crate::openai_tools::ResponsesApiTool; const APPLY_PATCH_LARK_GRAMMAR: &str = include_str!("tool_apply_patch.lark"); -#[derive(Serialize, Deserialize)] -pub(crate) struct ApplyPatchToolArgs { - pub(crate) input: String, -} - #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Hash)] #[serde(rename_all = "snake_case")] pub enum ApplyPatchToolType { diff --git a/codex-rs/rust-toolchain.toml b/codex-rs/rust-toolchain.toml index 0a9f6e81..7187a331 100644 --- a/codex-rs/rust-toolchain.toml +++ b/codex-rs/rust-toolchain.toml @@ -1,3 +1,3 @@ [toolchain] -channel = "1.89.0" -components = [ "clippy", "rustfmt", "rust-src"] +channel = "1.90.0" +components = ["clippy", "rustfmt", "rust-src"]