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

Download history 421/week @ 2023-12-06 506/week @ 2023-12-13 321/week @ 2023-12-20 210/week @ 2023-12-27 537/week @ 2024-01-03 448/week @ 2024-01-10 508/week @ 2024-01-17 436/week @ 2024-01-24 507/week @ 2024-01-31 415/week @ 2024-02-07 639/week @ 2024-02-14 624/week @ 2024-02-21 390/week @ 2024-02-28 412/week @ 2024-03-06 350/week @ 2024-03-13 433/week @ 2024-03-20

1,660 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

~29KB