mirror of https://github.com/rust-lang/async-book
Fix a wrong type: Pin<mut Self>
This commit is contained in:
parent
8b518af9af
commit
19d1766c9e
|
@ -350,7 +350,7 @@ impl Test {
|
|||
}
|
||||
}
|
||||
|
||||
fn init(self: Pin<mut Self>) {
|
||||
fn init(self: Pin<&mut Self>) {
|
||||
let self_ptr: *const String = &self.a;
|
||||
let this = unsafe { self.get_unchecked_mut() };
|
||||
this.b = self_ptr;
|
||||
|
|
Loading…
Reference in New Issue