mirror of https://github.com/rust-lang/async-book
🎨 Add blank lines between Test's methods
This commit is contained in:
parent
c7fa12f35a
commit
0faae314c1
|
@ -349,6 +349,7 @@ impl Test {
|
||||||
_marker: PhantomPinned, // This makes our type `!Unpin`
|
_marker: PhantomPinned, // This makes our type `!Unpin`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn init<'a>(self: Pin<&'a mut Self>) {
|
fn init<'a>(self: Pin<&'a mut Self>) {
|
||||||
let self_ptr: *const String = &self.a;
|
let self_ptr: *const String = &self.a;
|
||||||
let this = unsafe { self.get_unchecked_mut() };
|
let this = unsafe { self.get_unchecked_mut() };
|
||||||
|
@ -407,6 +408,7 @@ pub fn main() {
|
||||||
# _marker: PhantomPinned,
|
# _marker: PhantomPinned,
|
||||||
# }
|
# }
|
||||||
# }
|
# }
|
||||||
|
#
|
||||||
# fn init<'a>(self: Pin<&'a mut Self>) {
|
# fn init<'a>(self: Pin<&'a mut Self>) {
|
||||||
# let self_ptr: *const String = &self.a;
|
# let self_ptr: *const String = &self.a;
|
||||||
# let this = unsafe { self.get_unchecked_mut() };
|
# let this = unsafe { self.get_unchecked_mut() };
|
||||||
|
@ -459,6 +461,7 @@ pub fn main() {
|
||||||
# _marker: PhantomPinned, // This makes our type `!Unpin`
|
# _marker: PhantomPinned, // This makes our type `!Unpin`
|
||||||
# }
|
# }
|
||||||
# }
|
# }
|
||||||
|
#
|
||||||
# fn init<'a>(self: Pin<&'a mut Self>) {
|
# fn init<'a>(self: Pin<&'a mut Self>) {
|
||||||
# let self_ptr: *const String = &self.a;
|
# let self_ptr: *const String = &self.a;
|
||||||
# let this = unsafe { self.get_unchecked_mut() };
|
# let this = unsafe { self.get_unchecked_mut() };
|
||||||
|
@ -520,6 +523,7 @@ The type system prevents us from moving the data.
|
||||||
> # _marker: PhantomPinned,
|
> # _marker: PhantomPinned,
|
||||||
> # }
|
> # }
|
||||||
> # }
|
> # }
|
||||||
|
> #
|
||||||
> # fn init<'a>(self: Pin<&'a mut Self>) {
|
> # fn init<'a>(self: Pin<&'a mut Self>) {
|
||||||
> # let self_ptr: *const String = &self.a;
|
> # let self_ptr: *const String = &self.a;
|
||||||
> # let this = unsafe { self.get_unchecked_mut() };
|
> # let this = unsafe { self.get_unchecked_mut() };
|
||||||
|
|
Loading…
Reference in New Issue