|
|
|
|
|
by rusbus
1851 days ago
|
|
Traits are applied to types and because the length of the array is part of the type, different length arrays are different types. It's only with the very recent launch of const generics (allowing constant values like numbers as generic type parameters) that it became possible to abstract over things like array length. IIRC there is some stickiness about the default trait that is still blocking a const generic array initializer. |
|