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.
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
Refactor: use camino utf8-path types where applicable #59
Refactor: use camino utf8-path types where applicable #59
Changes from 2 commits
5ec238b
e499df1
a8d9d15
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Originally, I believe I made the choice of including only the first author because there was the slight risk that the combined name of all authors might exceed the SMDH limitations (which is a lengthy 128 bytes in UTF-16 https://www.3dbrew.org/wiki/SMDH#Format, but will never be shown in its entirety if it gets this long).
I guess it doesn't really matter either way, since the
authors
field is more-or-less getting abandoned by the Rust community (it's not even shown on crates.io anymore). I'm fine with the change.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, hmm... from looking at the
smdhtool
implementation, it seems like anything longer will just get truncated to0x40
characters anyway: https://github.com/devkitPro/3dstools/blob/master/src/smdhtool.cpp#L423-L429 — manually testing it seems to work as expected too.We could add a length check of our own and panic if the joined string is too long, but it would require calculating the UTF-16 length of the input UTF-8 string, so I think just letting it get truncated seems fine. Once #58 is implemented users will also be able to override the author string to their liking without needing to modify
Cargo.toml
'spackage.authors
field.