From afcb35661dc158827094734a22992dd704a0c70f Mon Sep 17 00:00:00 2001 From: Nolan Darilek Date: Wed, 21 Sep 2022 18:25:52 -0500 Subject: [PATCH] Bump dependency. --- Cargo.toml | 2 +- src/lib.rs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 72e7342..3918330 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,4 +10,4 @@ edition = "2021" bevy = { version = "0.8", default-features = false } [target.'cfg(windows)'.dependencies] -windows = { version = "0.39", features = ["Win32_System_Power", "Win32_System_Registry", "Win32_System_SystemServices"] } \ No newline at end of file +windows = { version = "0.40", features = ["Win32_System_Power", "Win32_System_Registry", "Win32_System_SystemServices"] } \ No newline at end of file diff --git a/src/lib.rs b/src/lib.rs index 9cf71e1..bd1eaff 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -40,18 +40,18 @@ fn focus_change( ) { let config: FullThrottleConfig = config .map(|v| *v) - .unwrap_or_else(|| FullThrottleConfig::default()); + .unwrap_or_else(FullThrottleConfig::default); for event in focus.iter() { if event.focused { #[cfg(windows)] unsafe { - Power::PowerSetActiveScheme(None, &GUID_MIN_POWER_SAVINGS); + Power::PowerSetActiveScheme(None, Some(&GUID_MIN_POWER_SAVINGS)); } } else { #[cfg(windows)] if config.restore_original_scheme_on_unfocus { unsafe { - Power::PowerSetActiveScheme(None, &**scheme); + Power::PowerSetActiveScheme(None, Some(&**scheme)); } } }