Skip to content

Conversation

@tisonkun
Copy link
Contributor

See comments inline.

@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 Nov 30, 2025
@rustbot
Copy link
Collaborator

rustbot commented Nov 30, 2025

r? @Mark-Simulacrum

rustbot has assigned @Mark-Simulacrum.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Comment on lines -411 to -412
debug_assert!(self.is_initialized());

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Already checked in get_unchecked

if self.get_mut().is_none() {
self.initialize(f)?;
}
debug_assert!(self.is_initialized());
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Already checked in get_unchecked_mut


#[inline]
fn is_initialized(&self) -> bool {
fn initialized(&self) -> bool {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Aligned with initialized_mut.

is_initialized_mut doesn't follow some idioms that is_xxx would typically take &self.

Comment on lines +522 to +529
fn initialized_mut(&mut self) -> bool {
// `state()` does not perform an atomic load, so prefer it over `is_complete()`.
let state = self.once.state();
match state {
OnceExclusiveState::Complete => true,
_ => false,
}
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is what LazyLock already does.

@tisonkun
Copy link
Contributor Author

tisonkun commented Dec 1, 2025

r? @yoshuawuyts

@rustbot
Copy link
Collaborator

rustbot commented Dec 1, 2025

Failed to set assignee to yoshuawuyts: invalid assignee

Note: Only org members with at least the repository "read" role, users with write permissions, or people who have commented on the PR may be assigned.

@yoshuawuyts
Copy link
Member

Thanks for the ping @tisonkun, though I don't think I'm the right person to review this PR.

@tisonkun
Copy link
Contributor Author

tisonkun commented Dec 2, 2025

Thanks for the ping @tisonkun, though I don't think I'm the right person to review this PR.

Yeah .. Do you know where to find the right person? I remember you as an experienced async Rust developer and consider that you can give a review on whether the changes are reasonable.

rustbot auto selects @Mark-Simulacrum but IIRC he is busy on Rust releases and builds. Thus I hope we can expand the bandwidth with other proper reviewer.

@Mark-Simulacrum
Copy link
Member

I continue to actively review PRs, typically on a weekly basis. Please be patient with our reviewer pool.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants