Skip to content

Implement TryFrom<[(K, V); N]> for ArrayMap<K, V, M> and From<[(K, V); N]> for ArrayMap<K, V, N> #12

@Luro02

Description

@Luro02
Owner

See: rust-lang/rust#84111

The TryFrom implementation is already kind of implemented by TryFromIterator and rust 2021 edition (with the new edition arrays implement IntoIterator trait):

let table = ArrayMap::try_from_iterator([
    (1, 2),
    (3, 4),
    (5, 6)
]).expect("failed to create the hash map");

Activity

Luro02

Luro02 commented on Aug 22, 2021

@Luro02
OwnerAuthor

#13 will be used to keep track of the TryFrom implementation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @Luro02

        Issue actions

          Implement `TryFrom<[(K, V); N]> for ArrayMap<K, V, M>` and `From<[(K, V); N]> for ArrayMap<K, V, N>` · Issue #12 · Luro02/array-map