From fbd4859a0ea5eb97880af80a467b59f394e38e7d Mon Sep 17 00:00:00 2001 From: John Nunley Date: Fri, 22 Mar 2024 18:00:33 -0700 Subject: [PATCH 1/2] docs: Clarify Win32 handle validity This commit clarifies what is expected by the system for a Win32 handle. It is expected that the Win32 handle belongs to the current thread. This is not a breaking change as it was previously necessary for the window to be considered "valid". cc https://github.com/rust-windowing/winit/pull/3593 Signed-off-by: John Nunley --- src/windows.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/windows.rs b/src/windows.rs index 52c6079..bc2e3bb 100644 --- a/src/windows.rs +++ b/src/windows.rs @@ -59,6 +59,10 @@ pub struct Win32WindowHandle { impl Win32WindowHandle { /// Create a new handle to a window. /// + /// # Safety + /// + /// It is assumed that the Win32 handle belongs to the current thread. This + /// is necessary for the handle to be considered "valid" in all cases. /// /// # Example /// From 64e4b88601356dd828538f219c928f17724c6928 Mon Sep 17 00:00:00 2001 From: John Nunley Date: Fri, 22 Mar 2024 18:59:43 -0700 Subject: [PATCH 2/2] chore: fmt Signed-off-by: John Nunley --- src/windows.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/windows.rs b/src/windows.rs index bc2e3bb..3595031 100644 --- a/src/windows.rs +++ b/src/windows.rs @@ -60,7 +60,7 @@ impl Win32WindowHandle { /// Create a new handle to a window. /// /// # Safety - /// + /// /// It is assumed that the Win32 handle belongs to the current thread. This /// is necessary for the handle to be considered "valid" in all cases. ///