Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/advance/circle-self-ref/self-referential.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ impl SelfRef {

fn pointer_to_value(&self) -> &String {
assert!(!self.pointer_to_value.is_null(),
"Test::b called without Test::init being called first");
"SelfRef::pointer_to_value called without SelfRef::init being called first");
unsafe { &*(self.pointer_to_value) }
}
}
Expand Down Expand Up @@ -189,7 +189,8 @@ impl SelfRef {
}

fn pointer_to_value(&self) -> &String {
assert!(!self.pointer_to_value.is_null(), "Test::b called without Test::init being called first");
assert!(!self.pointer_to_value.is_null(),
"SelfRef::pointer_to_value called without SelfRef::init being called first");
unsafe { &*(self.pointer_to_value) }
}
}
Expand Down