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

Use BoundedVec more #3

Open
olehmisar opened this issue Sep 11, 2024 · 0 comments · May be fixed by #14
Open

Use BoundedVec more #3

olehmisar opened this issue Sep 11, 2024 · 0 comments · May be fixed by #14
Assignees
Labels
enhancement New feature or request

Comments

@olehmisar
Copy link
Contributor

Problem

BoundedVec is a structure that represents a (arr, len) pair. StringBody::new and SubString::new should accept BoundedVec as a parameter (or implement From)

Happy Case

let haystack_text = BoundedVec::from_array("the quick brown fox jumped over the lazy dog".as_bytes());
let needle_text = BoundedVec::from_array(" the lazy dog".as_bytes());

let haystack: StringBody64 = StringBody::new(haystack_text);
let needle: SubString32 = SubString::new(needle_text);

// or even
let haystack: StringBody64 = haystack_text.into();

Workaround

None

Workaround Description

No response

Additional Context

No response

Project Impact

Nice-to-have

Blocker Context

No response

Would you like to submit a PR for this Issue?

Maybe

Support Needs

No response

@olehmisar olehmisar added the enhancement New feature or request label Sep 11, 2024
@jtriley2p jtriley2p linked a pull request Nov 25, 2024 that will close this issue
2 tasks
@Savio-Sou Savio-Sou added this to Noir Jan 15, 2025
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Noir Jan 15, 2025
@Savio-Sou Savio-Sou moved this from 📋 Backlog to 🏗 In progress in Noir Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: 🏗 In progress
Development

Successfully merging a pull request may close this issue.

2 participants