Skip to content

Fix example in Extend<(A, B)> impl#88122

Merged
bors merged 1 commit into
rust-lang:masterfrom
Seppel3210:master
Aug 22, 2021
Merged

Fix example in Extend<(A, B)> impl#88122
bors merged 1 commit into
rust-lang:masterfrom
Seppel3210:master

Conversation

@Seppel3210
Copy link
Copy Markdown
Contributor

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

@rust-highfive
Copy link
Copy Markdown
Contributor

r? @dtolnay

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 17, 2021
Copy link
Copy Markdown
Member

@dtolnay dtolnay left a comment

Choose a reason for hiding this comment

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

Great! Thank you.

@dtolnay
Copy link
Copy Markdown
Member

dtolnay commented Aug 21, 2021

@bors r+

@bors
Copy link
Copy Markdown
Collaborator

bors commented Aug 21, 2021

📌 Commit 71e4f44 has been approved by dtolnay

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 21, 2021
@bors
Copy link
Copy Markdown
Collaborator

bors commented Aug 22, 2021

⌛ Testing commit 71e4f44 with merge 80dad64...

@bors
Copy link
Copy Markdown
Collaborator

bors commented Aug 22, 2021

☀️ Test successful - checks-actions
Approved by: dtolnay
Pushing 80dad64 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Aug 22, 2021
@bors bors merged commit 80dad64 into rust-lang:master Aug 22, 2021
@rustbot rustbot added this to the 1.56.0 milestone Aug 22, 2021
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants