You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This seems to happen every time a value is initialized from an empty HashMap, including as a set_default
use config::Config;use std::collections::HashMap;fnmain(){let config = Config::builder().set_default("var",HashMap::<String,i64>::new()).unwrap().build().unwrap();// returns empty HashMap on 0.14.*/0.15.2, Errs on "invalid type: unit value, expected a map" on 0.15.3/0.15.4let val :HashMap<String,i64> = config.get("var").unwrap();println!("Hello, world! {:?}", val);}
version: 0.15.4
Config fails to initialize (an empty) HashMap from an empty object.
Repro:
Expected behavior: data is initialized to an empty HashMap.
Actual result:
Err( invalid type: unit value, expected a map )
The text was updated successfully, but these errors were encountered: