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

Download history 435/week @ 2024-07-21 567/week @ 2024-07-28 462/week @ 2024-08-04 839/week @ 2024-08-11 766/week @ 2024-08-18 814/week @ 2024-08-25 557/week @ 2024-09-01 477/week @ 2024-09-08 609/week @ 2024-09-15 656/week @ 2024-09-22 729/week @ 2024-09-29 595/week @ 2024-10-06 650/week @ 2024-10-13 797/week @ 2024-10-20 715/week @ 2024-10-27 679/week @ 2024-11-03

2,864 downloads per month
Used in 20 crates (4 directly)

MIT license

8KB
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

~30KB