-
-
Notifications
You must be signed in to change notification settings - Fork 84
Closed
Labels
bugSomething isn't workingSomething isn't workingdocumentationImprovements or additions to documentationImprovements or additions to documentationno_stdIssues relating to the `no_std` usage of this crate.Issues relating to the `no_std` usage of this crate.
Description
Someone on Discord pointed out that Seq <-> Map conversions don't work under no_std, given that the marker types Vec, BTreeMap, HashMap are only available with alloc/std.
#[cfg(feature = "alloc")]
tuple_seq_as_map_arr!([(K, V); N], BTreeMap<KAs, VAs>);
#[cfg(feature = "std")]
tuple_seq_as_map_arr!([(K, V); N], HashMap<KAs, VAs>);- Introduce
MapandList/Seqtypes as replacements available inno_std. - Implement the required conversions.
- The conversions might be able to use
IntoIterator/FromIteratorinstead of hard-coding certain combinations. This could bring it closer to the oldertuple_list_as_mapbehavior.
- The conversions might be able to use
- Update existing examples to slowly migrate to these new types.
Open questions:
- Is
ListorSeqthe better name? Serde uses seq. Mapmight conflict with type aliases or import renames. But are there alternatives?
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingdocumentationImprovements or additions to documentationImprovements or additions to documentationno_stdIssues relating to the `no_std` usage of this crate.Issues relating to the `no_std` usage of this crate.