Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
core: implement field::ValidLen for slices
There used to be a length restriction on the arrays usable to construct `ValueSet`s, but this was due to Rust compiler limitations that no longer exist. After that restriction was removed, the `ValidLen` trait was kept around but implemented for statically-sized arrays of all lengths. While in theory this allows `ValueSet`s to be constructed from arrays of arbitrary length, the size of the arrays must still be known at compile time. Now that there is no longer a restriction on the length of arrays, slices could in theory be used as well (since they meet the supertrait requirement of `ValidLen`), but no implementation of the trait exists. Adding an implementation of `ValidLen` for slices is straightforward. Refs: tokio-rs#2508
- Loading branch information