Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overriding enum values doesn't work #636

Open
xldenis opened this issue Jan 14, 2025 · 0 comments
Open

Overriding enum values doesn't work #636

xldenis opened this issue Jan 14, 2025 · 0 comments

Comments

@xldenis
Copy link

xldenis commented Jan 14, 2025

Consider the following enum:

#[derive(Deserialize)]
pub enum Config {
    Case1 {
        field: bool,
    },
    Case2 {
        field: String,
    },
}

It becomes impossible to override the value of Config in through overlaid sources leading to "value of enum Config should be represented by either string or table with exactly one key". I would like to be able to provide a default value for this configuration but have a later, more specific bit of config override this. Is this a change which would be acceptable?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant