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 |
#40 in #resize
2,864 downloads per month
Used in 20 crates
(4 directly)
8KB
130 lines
resize-slice
ResizeSlice
is an extension trait that allows slice references to be modified and shrunk in-place.
lib.rs
:
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]);
Dependencies
~30KB