working on two levels

This commit is contained in:
Tom Alexander 2020-04-11 20:34:16 -04:00
parent d5c3985c29
commit 7ace4be3c7
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
2 changed files with 15 additions and 0 deletions

View File

@ -120,6 +120,14 @@ mod tests {
}
}
impl<'a> Walkable for str {
type Output = str;
fn walk(&self, segment: &str) -> &str {
panic!("Tried to walk down a str");
}
}
#[test]
fn test_walk_path() {
let context: HashMap<&str, &str> = [

7
src/renderer/walkable.rs Normal file
View File

@ -0,0 +1,7 @@
use super::renderable::Renderable;
pub trait Walkable {
type Output: ?Sized + Walkable;
fn walk(&self, segment: &str) -> &Self::Output;
}