Moving the custom types for the walk_path test inside the test function
This commit is contained in:
parent
273f6204d8
commit
869c32df21
@ -107,6 +107,8 @@ fn walk_path<'a>(context: &'a dyn ContextElement, path: &Vec<&str>) -> &'a dyn C
|
|||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_walk_path() {
|
||||||
impl ContextElement for u32 {}
|
impl ContextElement for u32 {}
|
||||||
impl ContextElement for &str {}
|
impl ContextElement for &str {}
|
||||||
impl<I: ContextElement> ContextElement for HashMap<&str, I> {}
|
impl<I: ContextElement> ContextElement for HashMap<&str, I> {}
|
||||||
@ -147,8 +149,6 @@ mod tests {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn test_walk_path() {
|
|
||||||
let context: HashMap<&str, &str> =
|
let context: HashMap<&str, &str> =
|
||||||
[("cat", "kitty"), ("dog", "doggy"), ("tiger", "murderkitty")]
|
[("cat", "kitty"), ("dog", "doggy"), ("tiger", "murderkitty")]
|
||||||
.iter()
|
.iter()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user