From d0870745f269d5995905101d384ef51f3bcdad5d Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 12 Jun 2026 11:47:52 +0000 Subject: [PATCH] fix(windows): cast COINIT_APARTMENTTHREADED to u32 for windows-sys 0.61.2 windows-sys 0.61.2 changed CoInitializeEx's dwcoinit parameter type from i32 to u32, causing a mismatched types compile error on Windows. https://claude.ai/code/session_01F7yMUY48VuGNUF1Q3ma2cZ --- src/io/file_association.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/io/file_association.rs b/src/io/file_association.rs index 1d9f758a..caeba946 100644 --- a/src/io/file_association.rs +++ b/src/io/file_association.rs @@ -143,7 +143,7 @@ mod windows_impl { pub(super) fn set_default() -> Result { unsafe { - let co = CoInitializeEx(std::ptr::null(), COINIT_APARTMENTTHREADED); + let co = CoInitializeEx(std::ptr::null(), COINIT_APARTMENTTHREADED as u32); // S_OK (0) / S_FALSE (1) mean we initialised COM and must balance it // with CoUninitialize. Any other value: another init already owns the // thread's apartment, so we leave it alone.