4 ms·
What about printing vectors? (array dynamically sized) What other kind of traits are useful for arrays?
by The_rationalist 6y ago
What about printing vectors? (array dynamically sized)
What other kind of traits are useful for arrays?
- shakow 6y agoVectors can already be printed. Vectors types are only dependent on the contained elements, whereas Arrays types depend (until const generics come) both on the size of the array and the contained elements. So whereas a generic implementation of Display for Vec of any length was possible, Arrays required one implementation of Debug per possible length of the array.