Skip to content

chore: Fix more clippy lints#3585

Merged
larseggert merged 1 commit intomozilla:mainfrom
larseggert:chore-clippy-more
May 4, 2026
Merged

chore: Fix more clippy lints#3585
larseggert merged 1 commit intomozilla:mainfrom
larseggert:chore-clippy-more

Conversation

@larseggert
Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings May 4, 2026 07:04
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR is a small test-only cleanup that replaces Clippy-disfavored boolean equality/inequality assertions with the equivalent assert_eq!/assert_ne! forms. It keeps the existing test intent unchanged while aligning the test suite with Rust lint expectations in neqo-transport.

Changes:

  • Replaced assert!(*client.state() != State::Connected) with assert_ne!(*client.state(), State::Connected).
  • Replaced assert!(c_stats_before.dropped_rx == 0) with assert_eq!(c_stats_before.dropped_rx, 0).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
neqo-transport/tests/retry.rs Updates one retry-path test assertion to use assert_ne! without changing test behavior.
neqo-transport/src/connection/tests/handshake.rs Updates one handshake-statistics assertion to use assert_eq! without changing test behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Straightforward clippy lint fixes — assert!(x == y)assert_eq! and assert!(x != y)assert_ne!. Both replacements are semantically equivalent and produce better error messages on failure (printing both operands instead of just false).

I grepped for remaining assert!(... == ...) / assert!(... != ...) patterns across the repo. The remaining instances are all compound conditions (e.g., assert!(a == 1 || b == 1)), inside closures (assert!(iter.any(|x| x == ...))), or const_assert! — none of which are candidates for this transformation. This PR covers the actionable cases.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.87%. Comparing base (c032e66) to head (561a7d7).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3585      +/-   ##
==========================================
- Coverage   95.00%   94.87%   -0.13%     
==========================================
  Files         109      114       +5     
  Lines       37586    37931     +345     
  Branches    37586    37931     +345     
==========================================
+ Hits        35709    35988     +279     
- Misses       1187     1241      +54     
- Partials      690      702      +12     
Flag Coverage Δ
freebsd 93.97% <ø> (-0.13%) ⬇️
linux 95.00% <ø> (ø)
macos 94.95% <ø> (-0.01%) ⬇️
windows 95.02% <ø> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
neqo-common 98.61% <ø> (ø)
neqo-http3 93.92% <ø> (ø)
neqo-qpack 95.14% <ø> (ø)
neqo-transport 95.65% <100.00%> (+0.04%) ⬆️
neqo-udp 84.90% <ø> (ø)
mtu 86.61% <ø> (ø)

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 4, 2026

Benchmark results

No significant performance differences relative to ffa0aa2.

All results
transfer/1-conn/1-100mb-resp (aka. Download): No change in performance detected.
       time:   [200.87 ms 201.22 ms 201.58 ms]
       thrpt:  [496.08 MiB/s 496.96 MiB/s 497.84 MiB/s]
change:
       time:   [-0.1979% +0.0640% +0.3212] (p = 0.62 > 0.05)
       thrpt:  [-0.3202% -0.0640% +0.1983]
       No change in performance detected.
transfer/1-conn/10_000-parallel-1b-resp (aka. RPS): No change in performance detected.
       time:   [287.02 ms 288.88 ms 290.70 ms]
       thrpt:  [34.400 Kelem/s 34.616 Kelem/s 34.840 Kelem/s]
change:
       time:   [-0.6167% +0.2721% +1.1304] (p = 0.56 > 0.05)
       thrpt:  [-1.1178% -0.2714% +0.6205]
       No change in performance detected.
Found 5 outliers among 100 measurements (5.00%)
4 (4.00%) low mild
1 (1.00%) high mild
transfer/1-conn/1-1b-resp (aka. HPS): No change in performance detected.
       time:   [38.694 ms 38.838 ms 39.001 ms]
       thrpt:  [25.640   B/s 25.748   B/s 25.844   B/s]
change:
       time:   [-0.2824% +0.2419% +0.7475] (p = 0.36 > 0.05)
       thrpt:  [-0.7420% -0.2413% +0.2832]
       No change in performance detected.
Found 7 outliers among 100 measurements (7.00%)
2 (2.00%) high mild
5 (5.00%) high severe
transfer/1-conn/1-100mb-req (aka. Upload): Change within noise threshold.
       time:   [203.15 ms 203.67 ms 204.31 ms]
       thrpt:  [489.45 MiB/s 490.98 MiB/s 492.26 MiB/s]
change:
       time:   [-0.8645% -0.5057% -0.1245] (p = 0.01 < 0.05)
       thrpt:  [+0.1246% +0.5082% +0.8720]
       Change within noise threshold.
Found 2 outliers among 100 measurements (2.00%)
2 (2.00%) high severe
streams/walltime/1-streams/each-1000-bytes: No change in performance detected.
       time:   [586.66 µs 589.41 µs 592.42 µs]
       change: [-0.2229% +0.3322% +0.9267] (p = 0.27 > 0.05)
       No change in performance detected.
Found 17 outliers among 100 measurements (17.00%)
17 (17.00%) high severe
streams/walltime/1000-streams/each-1-bytes: No change in performance detected.
       time:   [12.285 ms 12.322 ms 12.377 ms]
       change: [-0.1517% +0.2905% +0.8825] (p = 0.27 > 0.05)
       No change in performance detected.
Found 1 outliers among 100 measurements (1.00%)
1 (1.00%) high severe
streams/walltime/1000-streams/each-1000-bytes: No change in performance detected.
       time:   [44.428 ms 44.477 ms 44.528 ms]
       change: [-0.1752% -0.0171% +0.1482] (p = 0.84 > 0.05)
       No change in performance detected.
Found 2 outliers among 100 measurements (2.00%)
2 (2.00%) high mild
transfer/walltime/pacing-false/varying-seeds: Change within noise threshold.
       time:   [23.415 ms 23.441 ms 23.475 ms]
       change: [-0.6788% -0.4539% -0.2486] (p = 0.00 < 0.05)
       Change within noise threshold.
Found 5 outliers among 100 measurements (5.00%)
3 (3.00%) high mild
2 (2.00%) high severe
transfer/walltime/pacing-true/varying-seeds: Change within noise threshold.
       time:   [23.458 ms 23.473 ms 23.489 ms]
       change: [-1.9561% -1.8463% -1.7361] (p = 0.00 < 0.05)
       Change within noise threshold.
Found 2 outliers among 100 measurements (2.00%)
2 (2.00%) high mild
transfer/walltime/pacing-false/same-seed: Change within noise threshold.
       time:   [23.245 ms 23.268 ms 23.292 ms]
       change: [-0.4661% -0.3466% -0.2247] (p = 0.00 < 0.05)
       Change within noise threshold.
Found 2 outliers among 100 measurements (2.00%)
1 (1.00%) high mild
1 (1.00%) high severe
transfer/walltime/pacing-true/same-seed: Change within noise threshold.
       time:   [23.886 ms 23.901 ms 23.917 ms]
       change: [+1.1903% +1.2919% +1.3858] (p = 0.00 < 0.05)
       Change within noise threshold.
Found 3 outliers among 100 measurements (3.00%)
3 (3.00%) high mild

Download data for profiler.firefox.com or download performance comparison data.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 4, 2026

Failed Interop Tests

QUIC Interop Runner, client vs. server, differences relative to main at ffa0aa2.

neqo-pr as clientneqo-pr as server
neqo-pr vs. go-x-net: BP BA
neqo-pr vs. haproxy: H DC LR C20 M S R Z 3 B U A L1 L2 C1 C2 6 V2 BP BA
neqo-pr vs. kwik: baseline result missing
neqo-pr vs. linuxquic: baseline result missing
neqo-pr vs. lsquic: run cancelled after 20 min
neqo-pr vs. msquic: baseline result missing
neqo-pr vs. mvfst: A BP BA
neqo-pr vs. neqo: A
neqo-pr vs. nginx: run cancelled after 20 min
neqo-pr vs. ngtcp2: run cancelled after 20 min
neqo-pr vs. picoquic: run cancelled after 20 min
neqo-pr vs. quic-go: baseline result missing
neqo-pr vs. quic-zig: baseline result missing
neqo-pr vs. quiche: run cancelled after 20 min
neqo-pr vs. s2n-quic: CM
neqo-pr vs. tquic: S BP BA
neqo-pr vs. xquic: A 🚀C1 ⚠️L1
aioquic vs. neqo-pr: CM
chrome vs. neqo-pr: run cancelled after 20 min
go-x-net vs. neqo-pr: run cancelled after 20 min
kwik vs. neqo-pr: run cancelled after 20 min
linuxquic vs. neqo-pr: run cancelled after 20 min
lsquic vs. neqo-pr: baseline result missing
msquic vs. neqo-pr: run cancelled after 20 min
mvfst vs. neqo-pr: run cancelled after 20 min
neqo vs. neqo-pr: run cancelled after 20 min
openssl vs. neqo-pr: LR M A CM
picoquic vs. neqo-pr: run cancelled after 20 min
quic-go vs. neqo-pr: CM
quic-zig vs. neqo-pr: run cancelled after 20 min
quiche vs. neqo-pr: 🚀L1 CM
quinn vs. neqo-pr: V2 CM
s2n-quic vs. neqo-pr: CM
tquic vs. neqo-pr: run cancelled after 20 min
xquic vs. neqo-pr: M CM
All results

Succeeded Interop Tests

QUIC Interop Runner, client vs. server

neqo-pr as client

neqo-pr as server

Unsupported Interop Tests

QUIC Interop Runner, client vs. server

neqo-pr as client

neqo-pr as server

@larseggert larseggert merged commit fca0621 into mozilla:main May 4, 2026
198 of 202 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 4, 2026

Client/server transfer results

Performance differences relative to ffa0aa2.

Transfer of 33554432 bytes over loopback, min. 100 runs. All unit-less numbers are in milliseconds.

Client vs. server (params) Mean ± σ Min Max MiB/s ± σ Δ baseline Δ baseline
msquic-neqo-cubic 160.5 ± 38.7 123.8 418.7 199.4 ± 0.8 💔 10.7 7.1%

Table above only shows statistically significant changes. See all results below.

All results

Transfer of 33554432 bytes over loopback, min. 100 runs. All unit-less numbers are in milliseconds.

Client vs. server (params) Mean ± σ Min Max MiB/s ± σ Δ baseline Δ baseline
google-google-nopacing 457.7 ± 1.9 451.6 467.7 69.9 ± 16.8
google-neqo-cubic 267.9 ± 2.4 263.4 273.3 119.4 ± 13.3 -0.7 -0.3%
msquic-msquic-nopacing 130.0 ± 31.8 111.4 316.7 246.2 ± 1.0
msquic-neqo-cubic 160.5 ± 38.7 123.8 418.7 199.4 ± 0.8 💔 10.7 7.1%
neqo-google-cubic 767.1 ± 2.0 762.1 773.0 41.7 ± 16.0 -0.1 -0.0%
neqo-msquic-cubic 150.5 ± 6.5 143.7 176.6 212.6 ± 4.9 -0.3 -0.2%
neqo-neqo-cubic 91.7 ± 2.5 87.8 100.5 348.9 ± 12.8 0.2 0.2%
neqo-neqo-cubic-nopacing 90.6 ± 2.7 86.0 100.1 353.1 ± 11.9 0.3 0.3%
neqo-neqo-newreno 92.0 ± 3.4 87.7 113.8 347.8 ± 9.4 -0.3 -0.3%
neqo-neqo-newreno-nopacing 90.9 ± 2.6 85.6 97.9 352.2 ± 12.3 -0.1 -0.1%
neqo-quiche-cubic 189.9 ± 3.2 184.0 204.9 168.5 ± 10.0 0.1 0.1%
neqo-s2n-cubic 215.4 ± 2.0 209.0 228.6 148.5 ± 16.0 -0.3 -0.1%
quiche-neqo-cubic 171.4 ± 4.2 160.2 189.8 186.7 ± 7.6 0.8 0.5%
quiche-quiche-nopacing 139.2 ± 2.5 133.7 149.5 229.8 ± 12.8
s2n-neqo-cubic 214.3 ± 3.4 208.2 227.8 149.3 ± 9.4 -0.2 -0.1%
s2n-s2n-nopacing 293.9 ± 27.6 280.0 407.1 108.9 ± 1.2

Download data for profiler.firefox.com or download performance comparison data.

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.

2 participants