rustonaut / vec1

Rust `Vec<T>` wrapper that gurantees to contain at least 1 element
Apache License 2.0
88 stars 15 forks source link

Add split_off_{first,last} methods #20

Closed robinkrahl closed 4 years ago

robinkrahl commented 4 years ago

This patch adds methods to decompose a Vec1 into the first or last element and the remaining Vec. Previously, we had to convert the Vec1 to a Vec and use the Vec::remove method to get a similar result.

Fixes #18.