turns out putting dyn everywhere fixes it

This commit is contained in:
Tom Alexander 2020-04-11 22:04:44 -04:00
parent c094997032
commit 07e5c9f0af
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE

View File

@ -142,16 +142,14 @@ mod tests {
} }
} }
fn do_the_walk<'a>(context: &'a impl Walkable, path: &Vec<&str>) -> &'a dyn Walkable { fn do_the_walk<'a>(context: &'a dyn Walkable, path: &Vec<&str>) -> &'a dyn Walkable {
let mut output = context; let mut output = context;
context.walk(path.first().unwrap()) for elem in path.iter() {
output = context.walk(elem);
}
// for elem in path.iter() { output
// output = context.walk(elem);
// }
// output
} }
#[test] #[test]