-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Fix FormattingOptions
instantiation with Default
#135977
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
Conversation
This comment has been minimized.
This comment has been minimized.
0fc0807
to
497a28b
Compare
The `fill` value by default should be set to `' '` (space), but the current implementation uses `#[derive(Default)]` which sets it to `\0`
497a28b
to
c9ae0bb
Compare
afaik we generally don't backport changes that only affect unstable APIs, since they're intended to only work on nightly, not beta or stable. If this fixes some stable API then that's a different story. |
@bors r+ rollup |
@nyurik Thanks, nice catch! |
"There is (now) a lint for that" (tm) |
The
fill
value by default should be set to' '
(space), but the current implementation uses#[derive(Default)]
which sets it to\0
.Note that
FormattingOptions
is being released as part of 1.85 (unstable) - so this might warrant a backport to that branch.Tracking issue: #118117
Follow up from #118159
CC: @EliasHolzmann @programmerjake
r? @m-ou-se