Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Added try_new for mutable data types #1589

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

aryanshomray
Copy link

@aryanshomray aryanshomray commented Nov 6, 2023

This PR is made to have consistent in try_new() constructors that accept DataType in a similar way, for all mutable array types

M::Type: Eq + Hash,
{
let map = ValueMap::<K, M>::from_values(values)?;
Ok(Self {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm... shouldn't data_type be validated here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I think what you need to check is that ValueMap's resulting data type is the same as data type being passed in?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants