Skip to content

ci: fix Rust 1.100 breakage (clippy lints, pin toolchain to 1.99.1) - #1593

Merged
ibigbug merged 2 commits into
masterfrom
chore/clippy-redundant-clone
Nov 14, 2026
Merged

ibigbug merged 2 commits into
masterfrom
chore/clippy-redundant-clone

Conversation

@ibigbug

@ibigbug ibigbug commented Nov 14, 2026 •

Copy link
Copy Markdown
Owner

Summary

CI picked up stable Rust 1.100.0 (2026-11-09), which broke the Build jobs on every PR (e.g. #1591, #1592) independent of their changes:

  1. Clippy: 1.100's clippy flags 6 redundant clones in clash-lib, failing -D warnings. Removed them (via cargo clippy --fix), plus a leftover no-op let dispatcher = dispatcher; in the mixed inbound.
  2. Windows build: 1.100's new cargo build-dir layout passes one -L per dependency to rustc. Under sccache the rustc command line for tor-keymgr reaches ~35K characters (263 -L entries), over the Windows 32K limit, failing with The filename or extension is too long. (os error 206). Cargo falls back to an argfile when it spawns rustc itself, but not through the sccache wrapper. Pinned the toolchain to 1.99.1 in rust-toolchain.toml (which overrides the toolchain the build workflow installs) and in ci.yml. Move back to stable once sccache / the build workflow handles this.

Test plan

  • cargo clippy -p clash-lib --all-targets -- -D warnings on both 1.100.0 and 1.99.1 (with tuic, shadowsocks, ssh, shadowquic, wireguard, tun, redir, tproxy, onion, tailscale, telemetry)
  • cargo clippy -p clash-rs -F standard,aws-lc-rs,onion --all-targets -- -D warnings on both toolchains
  • cargo +nightly fmt --all -- --check
  • CI Windows build passes

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • The Rust toolchain is now pinned to version 1.99.1 for local and CI builds, keeping the compiler version consistent.
  • Refactor
    • Several internal operations now avoid unnecessary copying. No changes to authentication, proxy handling, or archive extraction behavior are expected.

Stable Rust 1.100 flags these clones as redundant, which fails
`cargo clippy -- -D warnings` in CI for every PR.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The Rust toolchain is pinned to 1.99.1 in the local configuration and CI. Several code paths now move owned values or reuse an existing clone instead of making an additional clone.

Changes: Rust toolchain pin

Layer / File(s) Summary
Local and CI toolchain settings
rust-toolchain.toml, .github/workflows/ci.yml
The local toolchain and CI workflow now specify Rust 1.99.1 instead of stable. Comments describe the Windows command-line limit associated with versions at or above 1.100 and when the pin can return to stable.

Ownership updates

Layer / File(s) Summary
Move or reuse existing values
clash-lib/src/app/outbound/manager.rs, clash-lib/src/app/outbound/utils.rs, clash-lib/src/common/auth.rs, clash-lib/src/common/dashboard.rs, clash-lib/src/proxy/mixed/mod.rs
The outbound manager, proxy-group sorter, authenticator, dashboard extraction paths, and mixed proxy handler move owned values or reuse an existing clone instead of making an additional clone.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Suggested reviewers: itsusinn

Merge Risk: Minimal · up to deaf6

This PR removes redundant clones that Clippy 1.100 flags and pins the Rust toolchain to 1.99.1 to avoid a Windows command-line length failure under sccache. No behavior changes are expected, and no merge-blocking risk was found. Confirm that the Windows CI build passes.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the two real changes in the PR: clippy lint fixes for Rust 1.100 and pinning the toolchain to 1.99.1. The raw summary covers only the toolchain pin and a set of small redundant-clone r…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the two real changes in the PR: clippy lint fixes for Rust 1.100 and pinning the toolchain to 1.99.1. The raw summary covers only the toolchain pin and a set of small redundant-clone removals, which the title describes accurately. The title is short and specific, and it states the main change from the developer's point of view.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b31be4dc-4d54-4468-8f28-426d94db4ac2
Commits

Reviewing files that changed from the base of the PR and between f2533d6 and deaf6a5.

Files selected for processing: 7

  • .github/workflows/ci.yml
  • clash-lib/src/app/outbound/manager.rs
  • clash-lib/src/app/outbound/utils.rs
  • clash-lib/src/common/auth.rs
  • clash-lib/src/common/dashboard.rs
  • clash-lib/src/proxy/mixed/mod.rs
  • rust-toolchain.toml
Files with no reviewable changes: 1

  • clash-lib/src/proxy/mixed/mod.rs

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

@github-actions

github-actions Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

📊 Proxy Throughput Results

Shadowsocks

Transport Payload Runs Upload Mbps (±σ) Download Mbps (±σ)
plain 32 MB 3 2981.5 ±222.0 2882.1 ±207.6
obfs-http 32 MB 3 2695.3 ±197.6 2868.7 ±265.7
obfs-tls 32 MB 3 2121.4 ±8.6 2377.1 ±238.5
shadow-tls-v3 32 MB 3 606.0 ±144.9 2050.9 ±106.2
v2ray-plugin-ws-tls 32 MB 3 2682.0 ±172.0 1541.0 ±16.1

Trojan

Transport Payload Runs Upload Mbps (±σ) Download Mbps (±σ)
tcp 32 MB 3 2625.3 ±590.7 1587.6 ±64.7
ws 32 MB 3 1661.2 ±224.4 2768.3 ±422.2
grpc 32 MB 3 1017.2 ±124.3 1599.1 ±211.1

VMess

Transport Payload Runs Upload Mbps (±σ) Download Mbps (±σ)
tcp 32 MB 3 165.6 ±8.0 139.7 ±17.7
tcp-tls 32 MB 3 148.0 ±4.8 124.3 ±26.7
ws 32 MB 3 317.7 ±86.8 225.3 ±10.3
h2 32 MB 3 155.8 ±40.1 107.3 ±3.8
grpc 32 MB 3 153.9 ±30.4 148.5 ±11.5

VLESS

Transport Payload Runs Upload Mbps (±σ) Download Mbps (±σ)
tcp 32 MB 3 3172.4 ±164.7 727.1 ±109.3
ws 32 MB 3 1463.8 ±849.4 564.5 ±71.9
h2 32 MB 3 1134.3 ±189.1 319.0 ±24.7
grpc 32 MB 3 1744.0 ±294.0 2333.8 ±232.2

SOCKS5

Transport Payload Runs Upload Mbps (±σ) Download Mbps (±σ)
auth 32 MB 3 10725.8 ±375.6 11892.4 ±2676.2
noauth 32 MB 3 6959.6 ±1432.5 8621.3 ±1099.2

AnyTLS

Transport Payload Runs Upload Mbps (±σ) Download Mbps (±σ)
tls 32 MB 3 337.0 ±142.8 1280.8 ±199.6

Hysteria2

Transport Payload Runs Upload Mbps (±σ) Download Mbps (±σ)
plain 32 MB 3 537.8 ±65.2 889.6 ±99.1
salamander 32 MB 3 183.9 ±98.4 279.9 ±47.8

TUIC

Transport Payload Runs Upload Mbps (±σ) Download Mbps (±σ)
bbr 32 MB 3 796.3 ±504.7 523.6 ±425.5
cubic 32 MB 3 1002.9 ±251.8 430.9 ±13.2
new_reno 32 MB 3 1206.7 ±192.7 973.7 ±380.6

ShadowQUIC

Transport Payload Runs Upload Mbps (±σ) Download Mbps (±σ)
plain 32 MB 3 702.5 ±181.6 1164.8 ±320.1
over-stream 32 MB 3 709.5 ±97.7 1091.1 ±483.1

SSH

Transport Payload Runs Upload Mbps (±σ) Download Mbps (±σ)
password 32 MB 3 1873.1 ±117.9 1879.8 ±8.8
ed25519 32 MB 3 1572.9 ±119.3 1632.6 ±45.4

Netem Tests (50 ms delay, 1% packet loss)

Shadowsocks

Transport Payload Runs Upload Mbps (±σ) Download Mbps (±σ)
plain-netem 2 MB 3 26.5 ±9.6 19.5 ±11.4

Trojan

Transport Payload Runs Upload Mbps (±σ) Download Mbps (±σ)
tcp-netem 2 MB 3 24.3 ±10.8 15.9 ±15.9

Hysteria2

Transport Payload Runs Upload Mbps (±σ) Download Mbps (±σ)
plain-netem 2 MB 3 4.4 ±10.5 31.8 ±3.3

ShadowQUIC

Transport Payload Runs Upload Mbps (±σ) Download Mbps (±σ)
plain-netem 2 MB 3 3.6 ±14.8 28.3 ±3.7

Ran 33 variant(s) in parallel; each direction transfers the full payload.

🖥️ Test Environment

OS Linux 7.0.0-1019-azure
Architecture x86_64
Kernel 7.0.0-1019-azure
CPU AMD EPYC 7763 64-Core Processor
CPU Cores 4
Memory 15.61 GB
Docker 29.4.2
Rust rustc 1.99.1 (58cf8f9c3 2026-10-13)

📎 View full workflow run and download artifacts

Full test log

Download the throughput-results artifact from the workflow run for the full log.

Rust 1.100's new cargo build-dir layout passes one `-L` per dependency
to rustc. Under sccache on Windows the command line for tor-keymgr grows
to ~35K characters (263 `-L` entries), over the 32K CreateProcess limit,
failing with "The filename or extension is too long (os error 206)".
Cargo falls back to an argfile when it spawns rustc directly, but not
through the sccache wrapper.

rust-toolchain.toml overrides the toolchain installed by the build
workflow, so the pin goes there as well as in ci.yml.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ibigbug ibigbug changed the title chore: fix clippy redundant_clone lints from Rust 1.100 ci: fix Rust 1.100 breakage (clippy lints, pin toolchain to 1.99.1) Nov 14, 2026
@ibigbug
ibigbug merged commit 7952a3a into master Nov 14, 2026
9 checks passed
@ibigbug
ibigbug deleted the chore/clippy-redundant-clone branch November 14, 2026 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant