jprochazk / garde

A powerful validation library for Rust
Apache License 2.0
455 stars 27 forks source link

Why seal PathComponentKind ? #80

Closed Wicpar closed 9 months ago

Wicpar commented 10 months ago

The latest version breaks my usecase where i use parsed iso lang keys:

#[derive(Clone, Debug, Serialize, Deserialize, JsonSchema, Validate)]
#[serde(rename_all = "snake_case")]
pub struct I18nStruct {
    #[garde(dive)]
    pub i18n: HashMap<Lang, I18nName>,
}

why seal it ? people may need to have custom string-representable keys.

jprochazk commented 9 months ago

Can't remember why I did it. Maybe I was being overly defensive or something. Seems fine to unseal it

jprochazk commented 9 months ago

Fixed in https://github.com/jprochazk/garde/pull/81