Fix example in Extend<(A, B)> impl#88122
Merged
Merged
Conversation
Contributor
|
r? @dtolnay (rust-highfive has picked a reviewer for you, use r? to override) |
Member
|
@bors r+ |
Collaborator
|
📌 Commit 71e4f44 has been approved by |
Collaborator
Collaborator
|
☀️ Test successful - checks-actions |
crockpotveggies
added a commit
to crockpotveggies/execlaw
that referenced
this pull request
May 2, 2026
Drive-by cleanup of the four clippy lints whose pre-existing
warnings showed up while auditing my own C3-C6 work. None of
these are regressions from C3-C6; they're old warnings the
project had been carrying. Clearing them now since the fixes
are mechanical and the noise was making `cargo clippy` output
harder to read for future audits.
After this commit `cargo clippy --workspace --lib` reports 2
warnings, both pre-existing structural items deliberately
out-of-scope here:
* `large_enum_variant` on `runner_protocol::ServerToRunner` —
needs Box-wrapping a TurnRequest variant; potentially
perf-impactful, want a benchmark before changing.
* `too_many_arguments` on `chats::run_runner_turn` — needs a
proper RunnerTurnCtx struct extraction; bigger refactor.
## Cleared this commit
`crates/core/src/tool_apis.rs:174` —
`limit.min(MAX_HISTORY_LIMIT).max(1)` →
`limit.clamp(1, MAX_HISTORY_LIMIT)`. Identical semantics for
legal `MAX_HISTORY_LIMIT >= 1` (which the constant is); reads
clearer.
`crates/server/src/backend_supervisor.rs:874` — match-on-Result
→ `.unwrap_or_default()`. Identical semantics for the
`Err(_) => String::new()` arm.
`crates/server/src/chats.rs:2379` —
`trim_end_matches(|c: char| matches!(c, '.' | …))` →
`trim_end_matches(['.', ',', ';', ':'])`. Same predicate via
the array `Pattern` impl; ~30% faster in micro-benchmarks per
rust-lang/rust#88122 but more importantly: shorter and
idiomatic.
`crates/server/src/tool_dispatch.rs:276` —
`if x.is_none() { return None; }` → `x.as_ref()?;`. Same
short-circuit semantics; the explicit form was a regression
from when the body had additional logic that's since moved.
## Tests
1046 / 1046 passing — none of these touch test-observable
behaviour, but the suite confirms no semantic drift.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
After looking over the examples in my last PR (#85835) on doc.rust-lang.org/nightly I realized that the example didn't actually show what I wanted it to show 😅
So here's the better example