push_mut 0.1.0

Push a value to the back of the vector, and return a mutable reference to it.
Documentation
  • Coverage
  • 100%
    3 out of 3 items documented1 out of 3 items with examples
  • Size
  • Source code size: 2.4 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.06 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 9s Average build duration of successful builds.
  • all releases: 9s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • JohnScience/push_mut
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • JohnScience

push_mut

Crates.io Downloads Documentation License Dependency Status

Push a value to the back of the vector, and return a mutable reference to it.

Example

use push_mut::PushMut;

fn main() {
    let mut v = Vec::with_capacity(1);
    let last = v.push_mut(1);
    assert_eq!(*last, 1);
    *last = 2;
    assert_eq!(*last, 2);   
}