Resolve from_win32 confusion from windows-result#3701
Merged
Conversation
This reverts commit ba672c1.
7 tasks
Closed
pronebird
added a commit
to nymtech/nym-vpn-client
that referenced
this pull request
Oct 10, 2025
Error::from_win32() has been renamed to Error::from_thread() See: microsoft/windows-rs#3701
1 task
pronebird
added a commit
to nymtech/nym-vpn-client
that referenced
this pull request
Oct 10, 2025
Error::from_win32() has been renamed to Error::from_thread() See: microsoft/windows-rs#3701
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
from_win32method has a dual role that can be confusing as it either means retrieving the last error from the thread viaGetLastErroror it means converting a Win32 error code to anHRESULT. Then there's the internalfrom_threadthat retrieves the last error from the thread viaGetErrorInfo. I think we should settle onfrom_threadfor those functions that retrieve error information from the thread, in one way or another, and only usefrom_win32to mean converting from a Win32 error code.Fixes: #3700