From 158543f3364343ed1e411c5a8664c0a04e0401e4 Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Mon, 31 Oct 2016 17:29:12 +0100 Subject: [PATCH] Remove obsolete comment --- src/platform/windows/mod.rs | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/src/platform/windows/mod.rs b/src/platform/windows/mod.rs index 5d982d50..2d43752f 100644 --- a/src/platform/windows/mod.rs +++ b/src/platform/windows/mod.rs @@ -342,6 +342,15 @@ impl Window { } } +impl Drop for Window { + #[inline] + fn drop(&mut self) { + unsafe { + user32::PostMessageW(self.window.0, winapi::WM_DESTROY, 0, 0); + } + } +} + pub struct PollEventsIterator<'a> { window: &'a Window, } @@ -367,14 +376,3 @@ impl<'a> Iterator for WaitEventsIterator<'a> { self.window.events_receiver.recv().ok() } } - -impl Drop for Window { - #[inline] - fn drop(&mut self) { - unsafe { - // we don't call MakeCurrent(0, 0) because we are not sure that the context - // is still the current one - user32::PostMessageW(self.window.0, winapi::WM_DESTROY, 0, 0); - } - } -}