Open ChrisBuchholz opened 7 years ago
The easiest way on nightly would be to use Range::contains()
but that's experimental right now. It should probably default to false if the range is invalid.
Inclusive range is in stable now (1.26.0) so we can use it, contains & stuff are basically just convenience.
The patter used to implement
length
andrange
validators usingRangeInclusive
is ugly; especially the panic here: https://github.com/ChrisBuchholz/accord/blob/master/src/validators.rs#L74Find a better way.