From f60f13e246da7667453174a2b850561575457513 Mon Sep 17 00:00:00 2001 From: Isaiah Inuwa Date: Thu, 4 Dec 2025 15:28:05 -0600 Subject: [PATCH] Use fully qualified paths in webauthn_call macro --- .../desktop_native/win_webauthn/src/plugin/types.rs | 3 +-- apps/desktop/desktop_native/win_webauthn/src/util.rs | 8 ++++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/apps/desktop/desktop_native/win_webauthn/src/plugin/types.rs b/apps/desktop/desktop_native/win_webauthn/src/plugin/types.rs index 687fd601337..4ade8d22dff 100644 --- a/apps/desktop/desktop_native/win_webauthn/src/plugin/types.rs +++ b/apps/desktop/desktop_native/win_webauthn/src/plugin/types.rs @@ -9,9 +9,8 @@ use std::{mem::MaybeUninit, ptr::NonNull}; use base64::{engine::general_purpose::STANDARD, Engine as _}; use windows::{ core::{GUID, HRESULT}, - Win32::{Foundation::HWND, System::LibraryLoader::GetProcAddress}, + Win32::Foundation::HWND, }; -use windows_core::s; use crate::{ types::UserId, diff --git a/apps/desktop/desktop_native/win_webauthn/src/util.rs b/apps/desktop/desktop_native/win_webauthn/src/util.rs index eee0a2edc7f..57ba84dcde9 100644 --- a/apps/desktop/desktop_native/win_webauthn/src/util.rs +++ b/apps/desktop/desktop_native/win_webauthn/src/util.rs @@ -10,12 +10,12 @@ use crate::{ErrorKind, WinWebAuthnError}; macro_rules! webauthn_call { ($symbol:literal as fn $fn_name:ident($($arg:ident: $arg_type:ty),+) -> $result_type:ty) => ( - pub(super) fn $fn_name($($arg: $arg_type),*) -> Result<$result_type, WinWebAuthnError> { + pub(super) fn $fn_name($($arg: $arg_type),*) -> Result<$result_type, crate::WinWebAuthnError> { let library = crate::util::load_webauthn_lib()?; let response = unsafe { - let address = GetProcAddress(library, s!($symbol)).ok_or( - WinWebAuthnError::new( - ErrorKind::DllLoad, + let address = windows::Win32::System::LibraryLoader::GetProcAddress(library, windows::core::s!($symbol)).ok_or( + crate::WinWebAuthnError::new( + crate::ErrorKind::DllLoad, &format!( "Failed to load function {}", $symbol