Skip to content

Allow modifying Formatter members #19207

@bluss

Description

@bluss

std::fmt::Formatter's members are now private.

In my usecase, I was formatting an array of elements by passing down the formatter and using it for each element, so for example {:.2} would print each element to two decimals.

In this usage, it was useful to modify the width field of the Formatter so that the array elements were more padded out by default.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-feature-acceptedCategory: A feature request that has been accepted pending implementation.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions