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 |
#26 in #resize
1,660 downloads per month
Used in 19 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
~29KB