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

Added try_new for mutable data types#1589

Open
aryanshomray wants to merge 5 commits intojorgecarleitao:mainfrom
aryanshomray:ary/add_try_new
Open

Added try_new for mutable data types#1589
aryanshomray wants to merge 5 commits intojorgecarleitao:mainfrom
aryanshomray:ary/add_try_new

Conversation

@aryanshomray
Copy link
Copy Markdown

@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
Copy Markdown
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
Copy Markdown
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.

2 participants