We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 4864d53 + 582e154 commit 9734df2Copy full SHA for 9734df2
src/The-Safe-Pinned-Initialization-Problem.md
@@ -50,8 +50,8 @@ impl ListHead {
50
/// # Safety
51
///
52
/// Before using this [`ListHead`] the caller has to call [`ListHead::init`].
53
- unsafe fn new() -> ListHead {
54
- ListHead {
+ unsafe fn new() -> Self {
+ Self {
55
next: ptr::null_mut(),
56
prev: ptr::null_mut(),
57
}
@@ -86,8 +86,8 @@ impl DoubleList {
86
87
88
/// Before using this [`DoubleList`] the caller has to call [`DoubleList::init`].
89
90
- DoubleList {
91
// SAFETY: We call `ListHead::init` in our own initializer.
92
list_a: unsafe { ListHead::new() },
93
0 commit comments