Getting rid of some lifetimes

This commit is contained in:
Tom Alexander 2020-04-11 21:59:21 -04:00
parent 5098ee6338
commit c094997032
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE

View File

@ -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");
} }