Getting rid of some lifetimes
This commit is contained in:
parent
5098ee6338
commit
c094997032
@ -112,7 +112,7 @@ impl<'a> DustRenderer<'a> {
|
|||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
impl<'a, I: Walkable> Walkable for HashMap<&str, I> {
|
impl<I: Walkable> Walkable for HashMap<&str, I> {
|
||||||
fn walk(&self, segment: &str) -> &dyn Walkable {
|
fn walk(&self, segment: &str) -> &dyn Walkable {
|
||||||
self.get(segment).unwrap()
|
self.get(segment).unwrap()
|
||||||
}
|
}
|
||||||
@ -122,7 +122,7 @@ mod tests {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Walkable for &str {
|
impl Walkable for &str {
|
||||||
fn walk(&self, segment: &str) -> &dyn Walkable {
|
fn walk(&self, segment: &str) -> &dyn Walkable {
|
||||||
panic!("Tried to walk down a str");
|
panic!("Tried to walk down a str");
|
||||||
}
|
}
|
||||||
@ -132,7 +132,7 @@ mod tests {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Walkable for u32 {
|
impl Walkable for u32 {
|
||||||
fn walk(&self, segment: &str) -> &dyn Walkable {
|
fn walk(&self, segment: &str) -> &dyn Walkable {
|
||||||
panic!("Tried to walk down a str");
|
panic!("Tried to walk down a str");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user