mirror of
https://github.com/chatmail/core.git
synced 2026-04-29 11:26:29 +03:00
Explain more what's going on
This commit is contained in:
@@ -135,6 +135,8 @@ impl<'a> BobStateHandle<'a> {
|
|||||||
impl<'a> Drop for BobStateHandle<'a> {
|
impl<'a> Drop for BobStateHandle<'a> {
|
||||||
fn drop(&mut self) {
|
fn drop(&mut self) {
|
||||||
if self.clear_state_on_drop {
|
if self.clear_state_on_drop {
|
||||||
|
// The Option should already be empty because we take it out in the ctor,
|
||||||
|
// however the typesystem doesn't guarantee this so do it again anyway.
|
||||||
self.guard.take();
|
self.guard.take();
|
||||||
} else {
|
} else {
|
||||||
// Make sure to put back the BobState into the Option of the Mutex, it was taken
|
// Make sure to put back the BobState into the Option of the Mutex, it was taken
|
||||||
|
|||||||
Reference in New Issue
Block a user