From 4a4feefbfcd1c1036bbb38b2c18943364180b150 Mon Sep 17 00:00:00 2001 From: Maccesch Date: Wed, 15 Nov 2023 23:19:11 +0000 Subject: [PATCH] removed warnings because of get/get_untracked --- src/use_raf_fn.rs | 4 ++-- src/use_timestamp.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/use_raf_fn.rs b/src/use_raf_fn.rs index b18503c..27c7389 100644 --- a/src/use_raf_fn.rs +++ b/src/use_raf_fn.rs @@ -89,7 +89,7 @@ pub fn use_raf_fn_with_options( let previous_frame_timestamp = Cell::new(0.0_f64); move |timestamp: f64| { - if !is_active.get() { + if !is_active.get_untracked() { return; } @@ -111,7 +111,7 @@ pub fn use_raf_fn_with_options( let _ = loop_ref.replace(Box::new(loop_fn)); let resume = move || { - if !is_active.get() { + if !is_active.get_untracked() { set_active.set(true); request_next_frame(); } diff --git a/src/use_timestamp.rs b/src/use_timestamp.rs index cdc2576..27024b0 100644 --- a/src/use_timestamp.rs +++ b/src/use_timestamp.rs @@ -84,7 +84,7 @@ pub fn use_timestamp_with_controls_and_options(options: UseTimestampOptions) -> move || { update(); - callback(ts.get()); + callback(ts.get_untracked()); } };