Skip to content

Commit 19d1766

Browse files
Xiami2012taiki-e
authored andcommitted
Fix a wrong type: Pin<mut Self>
1 parent 8b518af commit 19d1766

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/04_pinning/01_chapter.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ impl Test {
350350
}
351351
}
352352
353-
fn init(self: Pin<mut Self>) {
353+
fn init(self: Pin<&mut Self>) {
354354
let self_ptr: *const String = &self.a;
355355
let this = unsafe { self.get_unchecked_mut() };
356356
this.b = self_ptr;

0 commit comments

Comments
 (0)