Skip to content

DebugTuple builder needs more options controlling its behaviour #1448

@nagisa

Description

@nagisa

DebugTuple should have options controlling how to output tuples with 0 and 1 element.

Currently if 0 fields are provided, only the name passed into debug_tuple is printed. Would be nice if there was option to print {name}().

Currently if only 1 field is provided, trailing comma is not printed. There should be an option to add one: (value,).

These could be added as option setters on the DebugTuple builder. E.g. fn empty_tuple(bool) and fn trailing_comma(bool).

That would make debug_tuple actually usable to print tuples.

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-libs-apiRelevant to the library API team, which will review and decide on the RFC.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions