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

chore: add the string that failed validation to IdentError::InvalidChars error variant #1555

Merged
merged 1 commit into from
Nov 4, 2024

Conversation

greenhat
Copy link
Contributor

Describe your changes

Add the string that failed validation to IdentError::InvalidChars error variant to see the failed string in the error message.

Checklist before requesting a review

  • Repo forked and branch created from next according to naming convention.
  • Commit messages and codestyle follow conventions.
  • Relevant issues are linked in the PR description.
  • Tests added for new functionality.
  • Documentation/comments updated according to changes.

@greenhat greenhat added the no changelog This PR does not require an entry in the `CHANGELOG.md` file label Oct 30, 2024
@greenhat greenhat marked this pull request as ready for review October 30, 2024 10:22
@bobbinth bobbinth requested review from bitwalker and plafer October 30, 2024 17:07
Copy link
Contributor

@plafer plafer left a comment

Choose a reason for hiding this comment

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

LGTM, except for a minor change

Comment on lines 320 to 321
// Err(IdentError::InvalidChars { ident: s.into() })
panic!("IdentError::InvalidChars")
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you forgot to uncomment the Err here right? i.e. we shouldn't be panicking, and returning an error instead

Copy link
Contributor

Choose a reason for hiding this comment

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

@greenhat - let's fix this issue and merge. This way, we can include this PR into the next release of miden-vm (which I'm hoping to do on Monday).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for catching this! Fixed.
Sorry, I should've picked it up earlier. I botched my email filter for github notifications and missed it.

@greenhat greenhat force-pushed the greenhat/indenterror-invalidchars-add-str branch from 1ebd196 to def81b8 Compare November 4, 2024 17:33
Copy link
Contributor

@bobbinth bobbinth left a comment

Choose a reason for hiding this comment

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

Looks good! Thank you!

@bobbinth bobbinth merged commit 60a5f37 into next Nov 4, 2024
9 checks passed
@bobbinth bobbinth deleted the greenhat/indenterror-invalidchars-add-str branch November 4, 2024 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no changelog This PR does not require an entry in the `CHANGELOG.md` file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants