BenjaminBrienen · GitHub

Feature gate: #![feature(vec_try_remove)]

This is a tracking issue for rust-lang/libs-team#649

Non-panicking version of Vec::remove which returns Option<T>.

Public API

// core::alloc::vec
impl<T> Vec<T> {
    pub fn try_remove(&mut self, index: usize) -> Option<T>;
}

Steps / History

(Remember to update the S-tracking-* label when checking boxes.)

Unresolved Questions

  • More non panicking methods?

Footnotes

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

Read the original on github.com ↗