From a8e97b77451e15f2875b3e53668e25e78aa621dd Mon Sep 17 00:00:00 2001 From: Dmitriy Pleshevskiy Date: Tue, 26 Jul 2022 18:35:22 +0300 Subject: [PATCH] chore: declare EqTrio in global scope --- src/structs/trio.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/structs/trio.rs b/src/structs/trio.rs index 5a8681a..cea088f 100644 --- a/src/structs/trio.rs +++ b/src/structs/trio.rs @@ -63,9 +63,10 @@ where mod tests { use super::*; + type EqTrio = Trio; + #[test] fn should_parse_into_trio() { - type EqTrio = Trio; let estr = EString::from("hello=world=hello"); match estr.parse::>() { Ok(res) => assert_eq!((res.0, res.1, res.2), ("hello", "world", "hello")), @@ -75,9 +76,8 @@ mod tests { #[test] fn should_parse_into_trio_with_alternate_delims() { - type EqTrio = Trio; let estr = EString::from("hello-world^hello"); - match estr.parse::>() { + match estr.parse::>() { Ok(res) => assert_eq!((res.0, res.1, res.2), ("hello", "world", "hello")), _ => unreachable!(), }; @@ -85,7 +85,6 @@ mod tests { #[test] fn should_parse_rest_as_trio() { - type EqTrio = Trio; let estr = EString::from("hello=world=hello=world=hello"); match estr.parse::>>() { Ok(res) => assert_eq!(res, Trio("hello", "world", Trio("hello", "world", "hello"))),