mirror of https://github.com/rust-lang/async-book
Remove explicit lifetimes where they could be elided
This commit is contained in:
parent
563406a6ee
commit
1881befc73
|
@ -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) }
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue