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

IDNA: Errors - Allow people to get specific error in basic values #794

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Arisa-Snowbell
Copy link

When for example I wanted to figure out whats wrong with the unicode string I tried to convert to ASCII I could before this get only string from of it becuase of the implemented Debug for Errors struct but thats very inconvinient trying to parse a string where there is the possibility of accessing the basic values themselves. This commit allows people to actually get the basic values and based on that decide what to do next in their code.

When for example I wanted to figure out whats wrong with the unicode string I tried to convert to ASCII
I could before this get only string from of it becuase of the implemented Debug for Errors struct but thats very inconvinient trying to parse a string where there is the possibility of accessing the basic values themselves.
This commit allows people to actually get the basic values and based on that decide what to do next in their code.
@codecov-commenter
Copy link

Codecov Report

Base: 85.31% // Head: 85.31% // No change to project coverage 👍

Coverage data is based on head (99326c5) compared to base (359bc90).
Patch has no changes to coverable lines.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #794   +/-   ##
=======================================
  Coverage   85.31%   85.31%           
=======================================
  Files          22       22           
  Lines        3915     3915           
=======================================
  Hits         3340     3340           
  Misses        575      575           
Impacted Files Coverage Δ
idna/src/uts46.rs 94.31% <ø> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@hsivonen
Copy link
Collaborator

hsivonen commented Jul 8, 2024

This commit allows people to actually get the basic values and based on that decide what to do next in their code.

What's the use case for this?

In idna 1.0, I removed all these error categorization fields, but there's an option to have each error flagged by a REPLACEMENT CHARACTER in the ToUnicode output, which can indicate to the end user where the errors were.

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

Successfully merging this pull request may close these issues.

3 participants