Closed greyblake closed 4 months ago
The following should work:
#[nutype( sanitize(with = |mut v| { v.sort(); v }), validate(predicate = |vec| !vec.is_empty()), derive(Debug, PartialEq, AsRef), )] struct SortedNotEmptyVec<T: Ord>(Vec<T>);
Fixed in https://github.com/greyblake/nutype/pull/158
The following should work: