Fix a wrong type: Pin<mut Self>

This commit is contained in:
Xiami 2021-11-05 16:05:27 +08:00 committed by Taiki Endo
parent 8b518af9af
commit 19d1766c9e
1 changed files with 1 additions and 1 deletions

View File

@ -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;