From b836d28a1353150763cf87586a112883be6e0443 Mon Sep 17 00:00:00 2001 From: Chris Morgan Date: Fri, 7 Nov 2014 16:26:12 +1100 Subject: [PATCH] Elide superfluous lifetimes. --- src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 3e716ce..e766913 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -122,12 +122,12 @@ impl AnyMap { impl AnyMap { /// Retrieve the value stored in the map for the type `T`, if it exists. - pub fn find<'a, T: 'static>(&'a self) -> Option<&'a T> { + pub fn find(&self) -> Option<&T> { self.data.find(&TypeId::of::()).map(|any| unsafe { any.as_ref_unchecked::() }) } /// Retrieve a mutable reference to the value stored in the map for the type `T`, if it exists. - pub fn find_mut<'a, T: 'static>(&'a mut self) -> Option<&'a mut T> { + pub fn find_mut(&mut self) -> Option<&mut T> { self.data.find_mut(&TypeId::of::()).map(|any| unsafe { any.as_mut_unchecked::() }) }