We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f12b93f commit 8f49874Copy full SHA for 8f49874
tests/Settings.yaml
@@ -15,3 +15,4 @@ place:
15
# For override tests
16
FOO: FOO should be overridden
17
bar: I am bar
18
+192.168.1.1: a string value
tests/file_yaml.rs
@@ -26,6 +26,8 @@ struct Settings {
26
place: Place,
27
#[serde(rename = "arr")]
28
elements: Vec<String>,
29
+ #[serde(rename = "192.168.1.1")]
30
+ ip_key: String,
31
}
32
33
fn make() -> Config {
@@ -35,6 +37,15 @@ fn make() -> Config {
35
37
.unwrap()
36
38
39
40
+#[test]
41
+fn test_keys_with_periods_deserialize() {
42
+ let c = make();
43
+
44
+ let s: Settings = c.try_deserialize().unwrap();
45
46
+ assert_eq!(s.ip_key, "a string value");
47
+}
48
49
#[test]
50
fn test_file() {
51
let c = make();
0 commit comments