diff --git a/src/source.rs b/src/source.rs index 7707511..befd940 100644 --- a/src/source.rs +++ b/src/source.rs @@ -23,7 +23,7 @@ pub trait Cache { /// /// This function may make use of attributes from the [`Fmt`] trait. // TODO: Don't box - fn display<'a>(&self, id: &'a Id) -> Option>; + fn display<'a>(&'a self, id: &'a Id) -> Option>; } impl<'b, C: Cache, Id: ?Sized> Cache for &'b mut C { @@ -32,7 +32,7 @@ impl<'b, C: Cache, Id: ?Sized> Cache for &'b mut C { fn fetch(&mut self, id: &Id) -> Result<&Source, Box> { C::fetch(self, id) } - fn display<'a>(&self, id: &'a Id) -> Option> { + fn display<'a>(&'a self, id: &'a Id) -> Option> { C::display(self, id) } } @@ -43,7 +43,7 @@ impl, Id: ?Sized> Cache for Box { fn fetch(&mut self, id: &Id) -> Result<&Source, Box> { C::fetch(self, id) } - fn display<'a>(&self, id: &'a Id) -> Option> { + fn display<'a>(&'a self, id: &'a Id) -> Option> { C::display(self, id) } }