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

#34 in #resize

Download history 416/week @ 2024-02-26 393/week @ 2024-03-04 366/week @ 2024-03-11 404/week @ 2024-03-18 474/week @ 2024-03-25 514/week @ 2024-04-01 298/week @ 2024-04-08 433/week @ 2024-04-15 343/week @ 2024-04-22 588/week @ 2024-04-29 428/week @ 2024-05-06 552/week @ 2024-05-13 542/week @ 2024-05-20 555/week @ 2024-05-27 435/week @ 2024-06-03 352/week @ 2024-06-10

1,926 downloads per month
Used in 19 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