Merge pull request #4 from sinkuu/fix_dropbox

Fix DropBox's drop
This commit is contained in:
Alex Crichton
2016-08-28 10:56:11 -07:00
committed by GitHub
+3 -3
View File
@@ -330,8 +330,9 @@ mod dropbox {
// Try our safe accessor first, and if it works then we know that // Try our safe accessor first, and if it works then we know that
// we're on the right thread. In that case we can simply drop as // we're on the right thread. In that case we can simply drop as
// usual. // usual.
if let Some(a) = self.get_mut().take() { if self.get().is_some() {
return drop(a) drop(self.inner.take().unwrap());
return;
} }
// If we're on the wrong thread but we actually have some data, then // If we're on the wrong thread but we actually have some data, then
@@ -345,4 +346,3 @@ mod dropbox {
} }
} }
} }