-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Open
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Description
Feature gate: #![feature(vec_fallible_shrink)]
This is a tracking issue for implementing fallible shrink methods on Vec so that they may be used in contexts without global OOM handling.
Public API
// alloc::vec
impl Vec {
pub fn try_shrink_to(&mut self, min_capacity: usize) -> Result<(), TryReserveError>;
pub fn try_shrink_to_fit(&mut self) -> Result<(), TryReserveError>;
}Steps / History
- ACP: Adding fallible shrinking to vec using
try_shrink_toandtry_shrink_to_fitlibs-team#728 - Implementation: Add try_shrink_to and try_shrink_to_fit to Vec #152366
- Final comment period (FCP)1
- Stabilization PR
Unresolved Questions
- Should this use AllocError or TryReserveError?
- None yet.
Footnotes
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.