Skip to content
This repository has been archived by the owner on Aug 3, 2023. It is now read-only.

Serializing manifest result in TOML error #2037

Closed
antiphoton opened this issue Aug 19, 2021 · 0 comments 路 Fixed by #2038
Closed

Serializing manifest result in TOML error #2037

antiphoton opened this issue Aug 19, 2021 · 0 comments 路 Fixed by #2038
Labels
bug Something isn't working

Comments

@antiphoton
Copy link
Contributor

馃悰 Bug report

Describe the bug

When trying to serialize wrangler::settings::toml::Manifest with some non-none HashMap value, the TOML serializer throws ValueAfterTable error. This is because TOML requires that table fields must come after other fields.

Reproduce the bug

The following code panics.

let manifest = Manifest {
    vars: Some(vec![
        (String::from("FOO"), String::from("some value")),
    ].into_iter().collect()),
    ..Default::default()
};
println!("{}", toml::to_string(&manifest).unwrap());

Expected behavior

The manifest is correctly serialized.

Environment and versions

  • output of wrangler -V:
    1.19.0
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant