Remove explicit lifetimes where they could be elided

This commit is contained in:
Samuel Tardieu 2022-01-16 10:29:49 +01:00 committed by Taiki Endo
parent 563406a6ee
commit 1881befc73
1 changed files with 2 additions and 2 deletions

View File

@ -574,11 +574,11 @@ impl Test {
boxed
}
fn a<'a>(self: Pin<&'a Self>) -> &'a str {
fn a(self: Pin<&Self>) -> &str {
&self.get_ref().a
}
fn b<'a>(self: Pin<&'a Self>) -> &'a String {
fn b(self: Pin<&Self>) -> &String {
unsafe { &*(self.b) }
}
}