mehcode / config-rs

⚙️ Layered configuration system for Rust applications (with strong support for 12-factor applications).
Apache License 2.0
2.43k stars 206 forks source link

Option<Decimal> always None #414

Closed telcy closed 1 year ago

telcy commented 1 year ago

config.yml

foo: 100.0
bar: 200.0
use rust_decimal::Decimal;
use serde::Deserialize;

#[derive(Debug, Deserialize)]
pub struct Config {
    pub foo: Decimal,
    pub bar: Option<Decimal>,
}

bar should be Some(200.0) but is always None.

matthiasbeyer commented 1 year ago

Hi! Thanks for your report. Unfortunately I cannot reproduce, see #415

telcy commented 1 year ago

Thank you. Appreciate your help. It is all working as intended and it turns out my slightly more complex case had a bug.

Keep up the good work.