Skip to content

Align dbg!() and line!() output #58647

Closed
Closed
@ranxiverba

Description

@ranxiverba

Hello.

Please, consider this issue as a minor.

Output of dbg!() macro will be better if it will align source code line number. I found that line!() macro does it. I think it would be nice if this macro always emit 4 chars, because most source code files has less than 10k lines. Consider the example:

[some/main.rs:84] hex::encode(dst.as_ref()) = "686aca464489"
[some/main.rs:126] hex::encode(src.as_ref()) = "f8c91afe015f"

I guess this will be better:

[some/main.rs:  84] hex::encode(dst.as_ref()) = "686aca464489"
[some/main.rs: 126] hex::encode(src.as_ref()) = "f8c91afe015f"

or

[some/main.rs:0084] hex::encode(dst.as_ref()) = "686aca464489"
[some/main.rs:0126] hex::encode(src.as_ref()) = "f8c91afe015f"

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-feature-requestCategory: A feature request, i.e: not implemented / a PR.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