Update assertion message in SelfRef::pointer_to_value

Update assertion message in pointer_to_value method
main
Snowball_233 23 hours ago committed by GitHub
commit 9d5a54db15
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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) }
}
}
@ -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) }
}
}

Loading…
Cancel
Save