4 releases
Uses old Rust 2015
| 0.1.3 | May 13, 2018 |
|---|---|
| 0.1.2 | Apr 8, 2016 |
| 0.1.0 | Jul 30, 2015 |
| 0.0.1 | Jul 21, 2015 |
#2915 in Rust patterns
2,323 downloads per month
Used in 26 crates
(5 directly)
8KB
130 lines
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]);
resize-slice
ResizeSlice is an extension trait that allows slice references to be modified and shrunk in-place.
Dependencies
~37KB