ops-core: adopt universal clippy/lint baseline; warnings to zero
Named the RecvError::Closed arm instead of a catch-all in a test (match_wildcard_for_single_variants).
clippy --all-targets clean, cargo fmt clean, tests green (10 passed+0 passed).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2 files changed,
+33 insertions,
-1 deletion
| 18 |
18 |
|
[dev-dependencies]
|
| 19 |
19 |
|
tempfile = "3.20"
|
| 20 |
20 |
|
serde_json = "1"
|
|
21 |
+ |
|
|
22 |
+ |
[lints.rust]
|
|
23 |
+ |
unused = "warn"
|
|
24 |
+ |
unreachable_pub = "warn"
|
|
25 |
+ |
|
|
26 |
+ |
[lints.clippy]
|
|
27 |
+ |
pedantic = { level = "warn", priority = -1 }
|
|
28 |
+ |
# Allow-list tuned from a measured breakdown across server/multithreaded/pter
|
|
29 |
+ |
# (2026-07-22). These are the high-churn / low-signal pedantic lints; everything
|
|
30 |
+ |
# else in `pedantic` stays a warning. Keep this block identical across repos.
|
|
31 |
+ |
module_name_repetitions = "allow"
|
|
32 |
+ |
# Doc lints — no docs-completeness push underway.
|
|
33 |
+ |
missing_errors_doc = "allow"
|
|
34 |
+ |
missing_panics_doc = "allow"
|
|
35 |
+ |
doc_markdown = "allow"
|
|
36 |
+ |
# Numeric casts — endemic and mostly intentional in size/byte math.
|
|
37 |
+ |
cast_possible_truncation = "allow"
|
|
38 |
+ |
cast_sign_loss = "allow"
|
|
39 |
+ |
cast_precision_loss = "allow"
|
|
40 |
+ |
cast_possible_wrap = "allow"
|
|
41 |
+ |
cast_lossless = "allow"
|
|
42 |
+ |
# Subjective structure/style nags — high churn, low signal.
|
|
43 |
+ |
must_use_candidate = "allow"
|
|
44 |
+ |
too_many_lines = "allow"
|
|
45 |
+ |
struct_excessive_bools = "allow"
|
|
46 |
+ |
similar_names = "allow"
|
|
47 |
+ |
items_after_statements = "allow"
|
|
48 |
+ |
single_match_else = "allow"
|
|
49 |
+ |
# Frequent false-positives in TUI/router-heavy code — added from the buckets breakdown.
|
|
50 |
+ |
match_same_arms = "allow"
|
|
51 |
+ |
unnecessary_wraps = "allow"
|
|
52 |
+ |
type_complexity = "allow"
|
| 215 |
215 |
|
let err = rx.recv().await.expect_err("expected Lagged");
|
| 216 |
216 |
|
match err {
|
| 217 |
217 |
|
broadcast::error::RecvError::Lagged(n) => assert!(n >= 10),
|
| 218 |
|
- |
other => panic!("unexpected error: {other:?}"),
|
|
218 |
+ |
broadcast::error::RecvError::Closed => panic!("unexpected error: Closed"),
|
| 219 |
219 |
|
}
|
| 220 |
220 |
|
}
|
| 221 |
221 |
|
}
|