summaryrefslogtreecommitdiffstats
path: root/tests/env.rs
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2021-11-23 09:36:21 +0100
committerGitHub <noreply@github.com>2021-11-23 09:36:21 +0100
commit1819dca65ae02afee9e495e961283a0b9ee62f0f (patch)
treef64c4bc5689ec2d0af1d2044f4e0b0890a94b51a /tests/env.rs
parent90cef8b93d19f72d46bcbf0edbd74f2d8dc992d9 (diff)
parent11296ae50625053a64dbc7210dff814899879d0f (diff)
Merge pull request #251 from conradludgate/value-deserialize
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 a1c82ef..1f7a263 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");