ngrammatic icon indicating copy to clipboard operation
ngrammatic copied to clipboard

API Breaking Change: remove `arity` parameters in favor of const generic

Open compenguy opened this issue 4 years ago • 0 comments

Ensure matching arity of structs at the type level by encoding as a const generic on the struct.

Missing from this change is:

  • insurance that the arity isn't zero (blocked on some std::num::NonZero* work to make it work with const generics)
  • simplify basic usage a little by providing a default ARITY of 2 (blocked on rust issue #44580 default values for const generic parameters are experimental)

The first change would be compatibility breaking, the second is not (pretty sure, anyway).

compenguy avatar Dec 27 '21 22:12 compenguy