From 706d6ac01721a0936582fc955e3382c526a9e05b Mon Sep 17 00:00:00 2001 From: Peter Evers Date: Sun, 17 Mar 2024 17:07:39 +0100 Subject: [PATCH] fix: dont crash on ios (#10) --- nosleep-ios/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nosleep-ios/src/lib.rs b/nosleep-ios/src/lib.rs index 3fe3dc9..a113136 100644 --- a/nosleep-ios/src/lib.rs +++ b/nosleep-ios/src/lib.rs @@ -21,9 +21,9 @@ impl NoSleepTrait for NoSleep { } /// iOS does not have a system sleep prevention API. - /// This method will always return an error. + /// This will do the same as prevent_display_sleep fn prevent_system_sleep(&mut self) -> Result<(), NoSleepError> { - unimplemented!() + self.prevent_display_sleep() } fn stop(&mut self) -> Result<(), NoSleepError> {