Skip to content

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

Description

@Luro02

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

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

      Issue actions