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>
@@ -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();