Skip to content

Use the direct From in Clone for OnceLock<T>#158157

Open
cuviper wants to merge 1 commit into
rust-lang:mainfrom
cuviper:once_lock-clone
Open

Use the direct From in Clone for OnceLock<T>#158157
cuviper wants to merge 1 commit into
rust-lang:mainfrom
cuviper:once_lock-clone

Conversation

@cuviper

@cuviper cuviper commented Jun 19, 2026

Copy link
Copy Markdown
Member

This is a followup to #158101 as again, the complexity of set is not necessary here, especially because we can now use that direct From.

r? tgross35

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jun 19, 2026
@rustbot

rustbot commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator

tgross35 is currently at their maximum review capacity.
They may take a while to respond.

@rust-log-analyzer

This comment has been minimized.

Again, the complexity of `set` is not necessary here.

@tgross35 tgross35 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@rust-bors

rust-bors Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

📌 Commit cced652 has been approved by tgross35

It is now in the queue for this repository.

@rust-bors rust-bors Bot 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 Jun 19, 2026
jhpratt added a commit to jhpratt/rust that referenced this pull request Jun 20, 2026
Use the direct `From` in `Clone for OnceLock<T>`

This is a followup to rust-lang#158101 as again, the complexity of `set` is not necessary here, especially because we can now use that direct `From`.

r? tgross35
rust-bors Bot pushed a commit that referenced this pull request Jun 20, 2026
Rollup of 3 pull requests

Successful merges:

 - #157976 (Improve `NumBufferTrait` associated items)
 - #157382 (Suggest `type` next to visibility for const items)
 - #158157 (Use the direct `From` in `Clone for OnceLock<T>`)
rust-bors Bot pushed a commit that referenced this pull request Jun 20, 2026
Rollup of 3 pull requests

Successful merges:

 - #157976 (Improve `NumBufferTrait` associated items)
 - #157382 (Suggest `type` next to visibility for const items)
 - #158157 (Use the direct `From` in `Clone for OnceLock<T>`)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants