Repository navigation
Style::from_dotted_str ignore non-ascii - #287
Merged
Merged
Conversation
Contributor
Author
|
Hm.. I'm not sure why the lint run on windows failed (the others passed) |
Member
Pre-existing, should be fixed if you rebase: |
danjl1100
force-pushed
the
style-ignore-nonascii
branch
from
May 12, 2026 16:25
d9b0786 to
0ebc85f
Compare
Contributor
Author
|
Awesome, rebased and the checks look better now. |
kodiakhq Bot
pushed a commit
to pdylanross/fatigue
that referenced
this pull request
Jul 2, 2026
Bumps console from 0.16.3 to 0.16.4. Release notes Sourced from console's releases. 0.16.4 What's Changed chore: Remove redudant helper and add TermInner constructors by @ChrisDenton in console-rs/console#284 Style::from_dotted_str ignore non-ascii by @danjl1100 in console-rs/console#287 feat: add is_dumb public function by @ugur-eren in console-rs/console#290 Commits 598eca9 Bump version to 0.16.4 0f22c35 feat: add is_dumb public function 1426649 Bump actions/checkout from 3 to 7 d2d89ad ignore non-ascii input in Style::from_dotted_str 6cff3e0 document current panic in Style::from_dotted_str via test cases dd4334f Apply suggestions from clippy 1.95 586efad Remove redundant as_handle helper be20e85 Add TermInner::new constructors See full diff in compare view Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase. Dependabot commands and options You can trigger Dependabot actions by commenting on this PR: @dependabot rebase will rebase this PR @dependabot recreate will recreate this PR, overwriting any edits that have been made to it @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
True colors were added to
Style::from_dotted_strin v0.16.2, but it seems like the string slicing only works for ascii (panicking for certain inputs).Of course, only ascii is expected as an input to the function, but I figured I'd raise this PR since the doc for that function ends with "Unknown terms are ignored". It seems unlikely (possible?) that someone would provide user-input to this function. At least the length check ensures we're not linearly checking ascii in any huge strings.
#[expect_panic]tests.#[expect_panic]to verify "Unknown terms are ignored".I identified this improvement while reviewing a delta in cargo-vet (myself).
I used AI to create the input strings that trigger both panic branches (as it's more familiar with UTF-8 details than me), but the commits and asserts are my own. I debated removing the comments the AI generated above the two inputs, but it seems like it helps document (at least against the current implementation). Feel free to adjust as you see fit.