Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

gpui: Fix Windows credential lookup returning error instead of `None` when credentials don't exist (#45228)

Lukas Wirth469da2fd07b6
diff --git a/crates/gpui/src/platform/windows/platform.rs b/crates/gpui/src/platform/windows/platform.rs
index af0cb89ecc9..0e0fdd56c54 100644
--- a/crates/gpui/src/platform/windows/platform.rs
+++ b/crates/gpui/src/platform/windows/platform.rs
@@ -659,7 +659,7 @@ impl Platform for WindowsPlatform {
if let Err(err) = result {
// ERROR_NOT_FOUND means the credential doesn't exist.
// Return Ok(None) to match macOS and Linux behavior.
- if err.code().0 == ERROR_NOT_FOUND.0 as i32 {
+ if err.code() == ERROR_NOT_FOUND.to_hresult() {
return Ok(None);
}
return Err(err.into());