Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@ jobs:
CP_TEST_GW_BIN: ${{ github.workspace }}/target/debug/gw
steps:
- uses: actions/checkout@v7
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
- name: Format
run: cargo fmt --all -- --check
Expand Down Expand Up @@ -83,7 +80,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: dtolnay/rust-toolchain@stable
# Run cargo-deny directly (pinned) rather than the action, whose musl
# container mis-resolves rust-toolchain.toml and tracks a floating CLI.
- uses: taiki-e/install-action@v2
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ jobs:
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@v7
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Stamp the tag into the workspace version
run: |
Expand Down
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ undocumented_unsafe_blocks = "deny"

[workspace.dependencies]
# --- async runtime ---
tokio = { version = "1", features = ["full"] }
tokio = { version = "1", features = ["rt-multi-thread", "macros", "time", "sync", "net", "signal", "io-util"] }
async-trait = "0.1"
futures = "0.3"
# --- web (server) ---
Expand Down
5 changes: 3 additions & 2 deletions crates/state/src/avail.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,9 @@ impl AvailStore for RedisAvail {
return (0, 0);
}
};
vals.chunks_exact(2).fold((0, 0), |(o, e), pair| {
(o + pair[0].unwrap_or(0), e + pair[1].unwrap_or(0))
let (pairs, _) = vals.as_chunks::<2>();
pairs.iter().fold((0, 0), |(o, e), [ok, err]| {
(o + ok.unwrap_or(0), e + err.unwrap_or(0))
})
}
}
Expand Down
5 changes: 5 additions & 0 deletions crates/views/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1288,6 +1288,7 @@ impl axum::extract::FromRequestParts<AppState> for Authed {

/// The shared body behind [`ApiJson`]/[`AnthJson`]: `axum::Json` with the
/// rejection rendered through the surface's own envelope.
#[allow(clippy::result_large_err)] // once per request; boxing would noise every call site
async fn extract_json<T, S>(
req: axum::extract::Request,
state: &S,
Expand Down Expand Up @@ -1669,6 +1670,7 @@ fn require_config_store(s: &AppState) -> Result<&Arc<gw_state::PostgresConfigSto

/// Key lookup under an admin scope: another tenant's key answers 404 (not
/// 403), so a tenant admin can't probe which keys exist outside its scope.
#[allow(clippy::result_large_err)] // once per request; boxing would noise every call site
async fn scoped_key(
s: &AppState,
scope: &AdminScope,
Expand Down Expand Up @@ -3568,6 +3570,7 @@ fn messages_stream_response(

/// Run a non-chat family request through the pipeline. `mt` is only a
/// placeholder protocol — the resolve_model DAG node maps the real one.
#[allow(clippy::result_large_err)] // once per request; boxing would noise every call site
async fn run_family(
s: &AppState,
ak: AkInfo,
Expand Down Expand Up @@ -4056,6 +4059,7 @@ async fn videos_generations(

/// The shared head of both video read routes: spend the caller's rate limits,
/// load the job under its tenant gate, poll the vendor and settle a first done.
#[allow(clippy::result_large_err)] // once per request; boxing would noise every call site
async fn admit_video_job(
s: &AppState,
ak: &AkInfo,
Expand Down Expand Up @@ -4091,6 +4095,7 @@ async fn admit_video_job(
Ok((job, account, poll))
}

#[allow(clippy::result_large_err)] // once per request; boxing would noise every call site
async fn poll_and_settle_video(
s: &AppState,
job: &VideoJob,
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[toolchain]
channel = "stable"
channel = "1.98.0"
components = ["rustfmt", "clippy"]