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

Use more raw string literals for clarity + minor cleanup #1907

Merged
merged 3 commits into from
Mar 22, 2025

Conversation

EliahKagan
Copy link
Member

This builds on 025e788 (#1528) and 6daaba3 (#1844), using r and br string 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 ,).

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.
@EliahKagan EliahKagan enabled auto-merge March 22, 2025 12:43
@EliahKagan EliahKagan merged commit 7b17da6 into GitoxideLabs:main Mar 22, 2025
21 checks passed
@EliahKagan EliahKagan deleted the run-ci/raw branch March 22, 2025 13:01
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.

1 participant