Skip to content

failed type conversion in .ini file for serde flatten  #504

Closed
@mfirhas

Description

@mfirhas

I think other formats are all fine, but for .ini/.env, when I flatten the structs into another struct, type conversion failed. I checked the code and found this:

https://github.com/mehcode/config-rs/blob/b3bda2c37ea4823b6842ce0f08fd281c07374d60/src/file/format/ini.rs#L21
https://github.com/mehcode/config-rs/blob/b3bda2c37ea4823b6842ce0f08fd281c07374d60/src/file/format/ini.rs#L30

All code are string-ed rightaway.

Should it be parsed like this?: https://github.com/mehcode/config-rs/blob/b3bda2c37ea4823b6842ce0f08fd281c07374d60/src/env.rs#L282

I test locally and it works and was about to create PR, but confuse with master branch status I faced unexpected error, unlike in v0.13.4.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions