You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I want to use ArrayString in rustc_hex::ToHex, this trait works on every type that implements FromIterator on Item=char.
But ArrayString is Item=u8.
So it's not that easy because ArrayString and ArrayVec are inherently different.
How do you think about making ArrayString just a wrapper of ArrayVec with the generic Array set to Array<Item=u8>? (just like String is a wrapper for Vec)
Activity
clarfonthey commentedon Jun 22, 2019
ArrayStringdoesn't implementFromIteratorat all. Presumably a PR adding this would be accepted.elichai commentedon Jun 24, 2019
So it's not that easy because
ArrayStringandArrayVecare inherently different.How do you think about making
ArrayStringjust a wrapper ofArrayVecwith the generic Array set toArray<Item=u8>? (just like String is a wrapper for Vec)If so maybe i'll work on a PR
bluss commentedon Sep 25, 2019
@elichai That won't work so well, ArrayString should be a wrapper around "ArrayVecCopy" (not yet implemented).
[-]Should ArrayString be Item=char?[/-][+]implement FromIterator<char> for ArrayString[/+]chris-morgan commentedon Jan 5, 2022
Closely related is
core::iter::Extend<A>, whichStringimplements forA = char | Box<str> | String | &char | &str | Cow<str>.