Skip to content

Display implementation for IpAddr doesn't respect width or alignment #66810

Closed
@jethrogb

Description

@jethrogb
Contributor
fn main() {
    println!("{:?}", format!("{:<15}", std::net::Ipv4Addr::UNSPECIFIED));
    println!("{:?}", format!("{:>15}", std::net::Ipv4Addr::UNSPECIFIED));
}

produces

"0.0.0.0"
"0.0.0.0"

but I'd expect

"0.0.0.0        "
"        0.0.0.0"

Activity

added
C-bugCategory: This is a bug.
T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.
on Nov 27, 2019
added a commit that references this issue on Dec 27, 2019

Auto merge of #67035 - Goirad:implement-ipadd-padding, r=dtolnay

Goirad

Goirad commented on Jan 2, 2020

@Goirad
Contributor

This can be closed now, at least for nightly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.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

        Participants

        @jethrogb@jonas-schievink@Goirad

        Issue actions

          Display implementation for IpAddr doesn't respect width or alignment · Issue #66810 · rust-lang/rust