Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Luro02 opened this issue Aug 21, 2021 · 1 comment

Comments

@Luro02
Copy link
Owner

Luro02 commented Aug 21, 2021

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");
Luro02 added a commit that referenced this issue Aug 22, 2021
@Luro02
Copy link
Owner Author

Luro02 commented Aug 22, 2021

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

@Luro02 Luro02 closed this as completed Aug 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant