-
Notifications
You must be signed in to change notification settings - Fork 200
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# Description ## Problem\* Implementing a concise, single-line method for converting arrays to BoundedVec would enhance usability. ## Summary\* This pull request implements the `From` trait to enable array-to-BoundedVec conversions, allowing for the following usage ```rust let vec = BoundedVec::from([1, 2, 3]); ``` instead of: ```rust let vec: BoundedVec<Field, 3> = BoundedVec::new(); vec.extend_from_array([1, 2, 3]); ``` ## Additional Context ## Documentation\* Check one: - [x] No documentation needed. - [ ] Documentation included in this PR. - [ ] **[For Experimental Features]** Documentation to be submitted in a separate PR. # PR Checklist\* - [x] I have tested the changes locally. - [x] I have formatted the changes with [Prettier](https://prettier.io/) and/or `cargo fmt` on default settings. --------- Co-authored-by: Arkadiusz Konior <akonior@gmail.com>
- Loading branch information
1 parent
2da2899
commit bf491dc
Showing
2 changed files
with
84 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters