Skip to content

Commit

Permalink
Add doc comment for Error::from_win32 (#2733)
Browse files Browse the repository at this point in the history
  • Loading branch information
Enyium authored Dec 8, 2023
1 parent 8e71051 commit 469312b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions crates/libs/core/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ impl Error {
}
}

/// Creates a new `Error` from the Win32 error code returned by `GetLastError()`.
pub fn from_win32() -> Self {
unsafe { Self { code: HRESULT::from_win32(crate::imp::GetLastError()), info: None } }
}
Expand Down

0 comments on commit 469312b

Please sign in to comment.