Skip to content

Display implementation for toml_edit::Document produces an empty string #1008

@ibraheemdev

Description

@ibraheemdev

The code below prints an empty string.

fn main() {
    let toml = r##"
[project]
x = "y"
    "##;

    let doc = toml.parse::<toml_edit::Document<String>>().unwrap();
    println!("{}", doc.to_string());
}

If I remove the project header it seems to print the key and value pair. DocumentMut also works perfectly fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-outputArea: Outputting TOMLC-bugCategory: Things not working as expected

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions