BlueGit

ict rusty-teams

fix(chat): windows clipboard error uses from_thread

- windows 0.62 has no Error::from_win32

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

metis Daniel Däschle · pushed by metis

Authored 2026-10-15 · 6 weeks ago

Hash
7e0216861648323efdc86c433c34702943fc99a4
Parent
9590d0f0
1 file changed +1 −1
crates/app-base/src/image_clipboard.rs +1 −1
@@ -96,7 +96,7 @@ mod windows_clipboard {
96 96 let global = Owned::new(GlobalAlloc(GMEM_MOVEABLE, data.len())?);
97 97 let pointer = GlobalLock(*global);
98 98 if pointer.is_null() {
99 return Err(windows::core::Error::from_win32());
99 return Err(windows::core::Error::from_thread());
100 100 }
101 101 std::ptr::copy_nonoverlapping(data.as_ptr(), pointer.cast(), data.len());
102 102 GlobalUnlock(*global).ok();
@@ -96,7 +96,7 @@ mod windows_clipboard {
96 let global = Owned::new(GlobalAlloc(GMEM_MOVEABLE, data.len())?);
96 let global = Owned::new(GlobalAlloc(GMEM_MOVEABLE, data.len())?);
97 let pointer = GlobalLock(*global);
97 let pointer = GlobalLock(*global);
98 if pointer.is_null() {
98 if pointer.is_null() {
99 return Err(windows::core::Error::from_win32());
99 return Err(windows::core::Error::from_thread());
100 }
100 }
101 std::ptr::copy_nonoverlapping(data.as_ptr(), pointer.cast(), data.len());
101 std::ptr::copy_nonoverlapping(data.as_ptr(), pointer.cast(), data.len());
102 GlobalUnlock(*global).ok();
102 GlobalUnlock(*global).ok();