Crate resize_slice

Source
Expand description

Shrinks slice references

ResizeSlice can be used to adjust the starting offset and length of a slice.

§Example

use resize_slice::ResizeSlice;

let mut slice: &mut [_] = &mut [1, 2, 3, 4, 5];
slice.resize_from(2);

assert_eq!(slice, &mut [3, 4, 5]);

Traits§

  • Extension trait that allows you to resize mutable slice references
  • Extension methods for slices
  • Extension methods for vector types