diff options
author | Aleksey Ivanov <ialexxei@gmail.com> | 2018-04-09 21:38:29 +0300 |
---|---|---|
committer | Aleksey Ivanov <ialexxei@gmail.com> | 2018-04-09 21:40:46 +0300 |
commit | 375befa7ddbdb1761611947226a0c117f4c35a5e (patch) | |
tree | ffe6f758823f5e9eabf0f0a60a3a5294c1520888 | |
parent | 9168bd745f088334005f0c206ff5606fd7a531a0 (diff) |
Use `try_into` instead of deprecated `deserialize`
-rw-r--r-- | tests/file_hjson.rs | 2 | ||||
-rw-r--r-- | tests/file_json.rs | 2 | ||||
-rw-r--r-- | tests/file_toml.rs | 2 | ||||
-rw-r--r-- | tests/file_yaml.rs | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/tests/file_hjson.rs b/tests/file_hjson.rs index f36843a..f8465be 100644 --- a/tests/file_hjson.rs +++ b/tests/file_hjson.rs @@ -43,7 +43,7 @@ fn test_file() { let c = make(); // Deserialize the entire file as single struct - let s: Settings = c.deserialize().unwrap(); + let s: Settings = c.try_into().unwrap(); assert!(s.debug.approx_eq_ulps(&1.0, 2)); assert_eq!(s.production, Some("false".to_string())); diff --git a/tests/file_json.rs b/tests/file_json.rs index 1d35cae..48836d8 100644 --- a/tests/file_json.rs +++ b/tests/file_json.rs @@ -43,7 +43,7 @@ fn test_file() { let c = make(); // Deserialize the entire file as single struct - let s: Settings = c.deserialize().unwrap(); + let s: Settings = c.try_into().unwrap(); assert!(s.debug.approx_eq_ulps(&1.0, 2)); assert_eq!(s.production, Some("false".to_string())); diff --git a/tests/file_toml.rs b/tests/file_toml.rs index 2d8203f..7feb6b5 100644 --- a/tests/file_toml.rs +++ b/tests/file_toml.rs @@ -51,7 +51,7 @@ fn test_file() { let c = make(); // Deserialize the entire file as single struct - let s: Settings = c.deserialize().unwrap(); + let s: Settings = c.try_into().unwrap(); assert!(s.debug.approx_eq_ulps(&1.0, 2)); assert_eq!(s.production, Some("false".to_string())); diff --git a/tests/file_yaml.rs b/tests/file_yaml.rs index 529a8e4..9864133 100644 --- a/tests/file_yaml.rs +++ b/tests/file_yaml.rs @@ -43,7 +43,7 @@ fn test_file() { let c = make(); // Deserialize the entire file as single struct - let s: Settings = c.deserialize().unwrap(); + let s: Settings = c.try_into().unwrap(); assert!(s.debug.approx_eq_ulps(&1.0, 2)); assert_eq!(s.production, Some("false".to_string())); |