summaryrefslogtreecommitdiffstats
path: root/tests/env.rs
diff options
context:
space:
mode:
authorConrad Ludgate <conradludgate@gmail.com>2021-11-22 14:00:10 +0000
committerConrad Ludgate <conradludgate@gmail.com>2021-11-23 07:40:53 +0000
commit11296ae50625053a64dbc7210dff814899879d0f (patch)
treed377f13881451f0b27eace0be61d0466ecb7c9e7 /tests/env.rs
parent3b60b9f5575ae60a672f006040707af423f67390 (diff)
rename try_into to try_deserialize to avoid confusion
Diffstat (limited to 'tests/env.rs')
-rw-r--r--tests/env.rs22
1 files changed, 11 insertions, 11 deletions
diff --git a/tests/env.rs b/tests/env.rs
index 4d1a966..fa076b6 100644
--- a/tests/env.rs
+++ b/tests/env.rs
@@ -113,7 +113,7 @@ fn test_parse_int() {
.build()
.unwrap();
- let config: TestIntEnum = config.try_into().unwrap();
+ let config: TestIntEnum = config.try_deserialize().unwrap();
assert!(matches!(config, TestIntEnum::Int(TestInt { int_val: 42 })));
@@ -145,7 +145,7 @@ fn test_parse_float() {
.build()
.unwrap();
- let config: TestFloatEnum = config.try_into().unwrap();
+ let config: TestFloatEnum = config.try_deserialize().unwrap();
// can't use `matches!` because of float value
match config {
@@ -180,7 +180,7 @@ fn test_parse_bool() {
.build()
.unwrap();
- let config: TestBoolEnum = config.try_into().unwrap();
+ let config: TestBoolEnum = config.try_deserialize().unwrap();
assert!(matches!(
config,
@@ -218,7 +218,7 @@ fn test_parse_off_int() {
env::remove_var("INT_VAL_1");
- config.try_into::<TestIntEnum>().unwrap();
+ config.try_deserialize::<TestIntEnum>().unwrap();
}
#[test]
@@ -249,7 +249,7 @@ fn test_parse_off_float() {
env::remove_var("FLOAT_VAL_1");
- config.try_into::<TestFloatEnum>().unwrap();
+ config.try_deserialize::<TestFloatEnum>().unwrap();
}
#[test]
@@ -280,7 +280,7 @@ fn test_parse_off_bool() {
env::remove_var("BOOL_VAL_1");
- config.try_into::<TestBoolEnum>().unwrap();
+ config.try_deserialize::<TestBoolEnum>().unwrap();
}
#[test]
@@ -311,7 +311,7 @@ fn test_parse_int_fail() {
env::remove_var("INT_VAL_2");
- config.try_into::<TestIntEnum>().unwrap();
+ config.try_deserialize::<TestIntEnum>().unwrap();
}
#[test]
@@ -342,7 +342,7 @@ fn test_parse_float_fail() {
env::remove_var("FLOAT_VAL_2");
- config.try_into::<TestFloatEnum>().unwrap();
+ config.try_deserialize::<TestFloatEnum>().unwrap();
}
#[test]
@@ -373,7 +373,7 @@ fn test_parse_bool_fail() {
env::remove_var("BOOL_VAL_2");
- config.try_into::<TestBoolEnum>().unwrap();
+ config.try_deserialize::<TestBoolEnum>().unwrap();
}
#[test]
@@ -401,7 +401,7 @@ fn test_parse_string() {
.build()
.unwrap();
- let config: TestStringEnum = config.try_into().unwrap();
+ let config: TestStringEnum = config.try_deserialize().unwrap();
let test_string = String::from("test string");
@@ -437,7 +437,7 @@ fn test_parse_off_string() {
.build()
.unwrap();
- let config: TestStringEnum = config.try_into().unwrap();
+ let config: TestStringEnum = config.try_deserialize().unwrap();
let test_string = String::from("test string");