Use more raw string literals for clarity + minor cleanup#1907
Merged
EliahKagan merged 3 commits intoGitoxideLabs:mainfrom Mar 22, 2025
Merged
Use more raw string literals for clarity + minor cleanup#1907EliahKagan merged 3 commits intoGitoxideLabs:mainfrom
EliahKagan merged 3 commits intoGitoxideLabs:mainfrom
Conversation
This builds on 025e788 (GitoxideLabs#1528) and 6daaba3 (GitoxideLabs#1844), using `r` and `br` string literals in more places where it helps use fewer backslashes, where doing so seems to improve readability.
The description contains a literal `\n` sequence, which seems to be for clarification or to facilitate searching for that sequence, but it was originally just concatenated to the end of the message. This parenthesizes it instead.
These appear unintentional, and in most cases may have been introduced before rustfmt collapsed the lines, or with the idea that they would cause rustfmt to expand the lines but where that did not occur, or in an earlier version of the code where the last argument was longer and thus split onto another line. This does not remove a trailing `,` after the same argument when the argument is on its own line. Although this does remove trailing `,` in some macro calls (e.g., `format!`), this of course avoids making such changes in macro definitions, where `,)` is semantic.
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.
This builds on 025e788 (#1528) and 6daaba3 (#1844), using
randbrstring literals in more places where it helps use fewer backslashes, where doing so seems to improve readability. It also makes two other changes to things discovered while doing that: a minor fix on a slightly confusing error case description found while doing that, and removal of the trailing,in function calls with all arguments on the same line that end in a literal,).