Much cleaner with impl walkable but don't know if I can loop yet

This commit is contained in:
Tom Alexander
2020-04-11 21:51:12 -04:00
parent 110b03fc45
commit ec3276af79
2 changed files with 2 additions and 5 deletions

View File

@@ -148,10 +148,7 @@ mod tests {
}
}
fn do_the_walk<'a, O: Walkable>(
context: &'a dyn Walkable<Output = O>,
path: &Vec<&str>,
) -> &'a impl Walkable {
fn do_the_walk<'a>(context: &'a impl Walkable, path: &Vec<&str>) -> &'a impl Walkable {
let mut output = context;
context.walk(path.first().unwrap())