Skip to content

Tracking Issue for binary_heap::PeekMut::refresh #138355

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
1 of 4 tasks
197g opened this issue Mar 11, 2025 · 0 comments
Open
1 of 4 tasks

Tracking Issue for binary_heap::PeekMut::refresh #138355

197g opened this issue Mar 11, 2025 · 0 comments
Labels
C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Comments

@197g
Copy link
Contributor

197g commented Mar 11, 2025

Feature gate: #![feature(binary_heap_peek_mut_refresh)]

This is a tracking issue for #138161 . This allows efficiently re-obtaining the maximum element of a binary heap after the peeked element was modified, and determines if the heap has changed as a result of that element modification.

Public API

// alloc::collections::binary_heap;

impl<'a, T: Ord, A: Allocator> PeekMut<'a, T, A> {
    pub fn refresh(&mut self) -> bool;
}

Steps / History

Unresolved Questions

  • Decide on a name to stabilize. Future interfaces for mutable handles into other sorted std collections should be consistent but there are no others yet.

Footnotes

  1. https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html

@197g 197g added C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. labels Mar 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

1 participant