summaryrefslogtreecommitdiffstats
path: root/tests/errors.rs
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2021-03-14 09:59:36 +0100
committerMatthias Beyer <mail@beyermatthias.de>2021-03-14 09:59:36 +0100
commitdef3702fac13605af303b8319af15943cc7ff8e5 (patch)
tree8d745347c365c6e21a44843be88d72cabd3b07dc /tests/errors.rs
parent48db2a16e892c3a21ada014fb8e163b33bcb483b (diff)
parentc26a941541ccd7733f7533372da71f0a5be36ed5 (diff)
Merge branch 'config-rs-issue-173'HEADmaster
Diffstat (limited to 'tests/errors.rs')
-rw-r--r--tests/errors.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/errors.rs b/tests/errors.rs
index ec96c98..04f11fe 100644
--- a/tests/errors.rs
+++ b/tests/errors.rs
@@ -56,7 +56,7 @@ fn test_error_type_detached() {
let c = make();
let value = c.get::<Value>("boolean_s_parse").unwrap();
- let res = value.try_into::<bool>();
+ let res = value.try_deserialize::<bool>();
assert!(res.is_err());
assert_eq!(
@@ -76,14 +76,14 @@ fn test_error_enum_de() {
}
let on_v: Value = "on".into();
- let on_d = on_v.try_into::<Diode>();
+ let on_d = on_v.try_deserialize::<Diode>();
assert_eq!(
on_d.unwrap_err().to_string(),
"enum Diode does not have variant constructor on".to_string()
);
let array_v: Value = vec![100, 100].into();
- let array_d = array_v.try_into::<Diode>();
+ let array_d = array_v.try_deserialize::<Diode>();
assert_eq!(
array_d.unwrap_err().to_string(),
"value of enum Diode should be represented by either string or table with exactly one key"
@@ -97,7 +97,7 @@ fn test_error_enum_de() {
.cloned()
.collect::<std::collections::HashMap<String, Value>>()
.into();
- let confused_d = confused_v.try_into::<Diode>();
+ let confused_d = confused_v.try_deserialize::<Diode>();
assert_eq!(
confused_d.unwrap_err().to_string(),
"value of enum Diode should be represented by either string or table with exactly one key"
@@ -122,7 +122,7 @@ inner:
let mut cfg = Config::new();
cfg.merge(File::from_str(CFG, FileFormat::Yaml)).unwrap();
- let e = cfg.try_into::<Outer>().unwrap_err();
+ let e = cfg.try_deserialize::<Outer>().unwrap_err();
if let ConfigError::Type {
key: Some(path), ..
} = e