Skip to content

Add unwrap method to MoveItems to reclaim the Vector #16879

Closed
@mahkoh

Description

@mahkoh
impl MoveItems<T> {
    /// Drops all elements that have not yet been moved and returns the (now empty) vector
    /// that was used in the creation of `self` without performing any allocations.
    pub fn unwrap(self) -> Vec<T> {
        // ...
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions