Use const instead of static

This commit is contained in:
Chris Denton 2022-08-18 19:08:49 +01:00
parent efd305e0ec
commit 625e7e9579
No known key found for this signature in database
GPG Key ID: 713472F2F45627DE

View File

@ -199,9 +199,9 @@ macro_rules! compat_fn_optional {
/// Load all needed functions from "api-ms-win-core-synch-l1-2-0".
pub(super) fn load_synch_functions() {
fn try_load() -> Option<()> {
static MODULE_NAME: &CStr = ansi_str!("api-ms-win-core-synch-l1-2-0");
static WAIT_ON_ADDRESS: &CStr = ansi_str!("WaitOnAddress");
static WAKE_BY_ADDRESS_SINGLE: &CStr = ansi_str!("WakeByAddressSingle");
const MODULE_NAME: &CStr = ansi_str!("api-ms-win-core-synch-l1-2-0");
const WAIT_ON_ADDRESS: &CStr = ansi_str!("WaitOnAddress");
const WAKE_BY_ADDRESS_SINGLE: &CStr = ansi_str!("WakeByAddressSingle");
// Try loading the library and all the required functions.
// If any step fails, then they all fail.