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

#6 in #resize

Download history 101/week @ 2021-07-04 104/week @ 2021-07-11 129/week @ 2021-07-18 203/week @ 2021-07-25 199/week @ 2021-08-01 185/week @ 2021-08-08 222/week @ 2021-08-15 213/week @ 2021-08-22 193/week @ 2021-08-29 194/week @ 2021-09-05 239/week @ 2021-09-12 217/week @ 2021-09-19 488/week @ 2021-09-26 466/week @ 2021-10-03 450/week @ 2021-10-10 536/week @ 2021-10-17

621 downloads per month
Used in 14 crates (4 directly)

MIT license

7KB
130 lines

resize-slice

travis-badge release-badge docs-badge license-badge

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

~27KB