Skip to content

Commit cd52d08

Browse files
doki23taiki-e
authored andcommitted
simplify code in box pin
1 parent 73cdf31 commit cd52d08

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
@@ -568,7 +568,7 @@ impl Test {
568568
_marker: PhantomPinned,
569569
};
570570
let mut boxed = Box::pin(t);
571-
let self_ptr: *const String = &boxed.as_ref().a;
571+
let self_ptr: *const String = &boxed.a;
572572
unsafe { boxed.as_mut().get_unchecked_mut().b = self_ptr };
573573
574574
boxed

0 commit comments

Comments
 (0)