From 11296ae50625053a64dbc7210dff814899879d0f Mon Sep 17 00:00:00 2001 From: Conrad Ludgate Date: Mon, 22 Nov 2021 14:00:10 +0000 Subject: rename try_into to try_deserialize to avoid confusion --- tests/env.rs | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'tests/env.rs') 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::().unwrap(); + config.try_deserialize::().unwrap(); } #[test] @@ -249,7 +249,7 @@ fn test_parse_off_float() { env::remove_var("FLOAT_VAL_1"); - config.try_into::().unwrap(); + config.try_deserialize::().unwrap(); } #[test] @@ -280,7 +280,7 @@ fn test_parse_off_bool() { env::remove_var("BOOL_VAL_1"); - config.try_into::().unwrap(); + config.try_deserialize::().unwrap(); } #[test] @@ -311,7 +311,7 @@ fn test_parse_int_fail() { env::remove_var("INT_VAL_2"); - config.try_into::().unwrap(); + config.try_deserialize::().unwrap(); } #[test] @@ -342,7 +342,7 @@ fn test_parse_float_fail() { env::remove_var("FLOAT_VAL_2"); - config.try_into::().unwrap(); + config.try_deserialize::().unwrap(); } #[test] @@ -373,7 +373,7 @@ fn test_parse_bool_fail() { env::remove_var("BOOL_VAL_2"); - config.try_into::().unwrap(); + config.try_deserialize::().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"); -- cgit v1.2.3