diff --git a/crates/hooks/src/use_animation.rs b/crates/hooks/src/use_animation.rs index f9e3f17eb..2f8906f70 100644 --- a/crates/hooks/src/use_animation.rs +++ b/crates/hooks/src/use_animation.rs @@ -779,12 +779,9 @@ pub fn use_animation( use_memo(move || { let context = context.read(); - if *has_run_yet.peek() - { + if *has_run_yet.peek() { match context.conf.on_deps_change { - OnDepsChange::Finish => { - animation.finish() - } + OnDepsChange::Finish => animation.finish(), OnDepsChange::Rerun => { let last_direction = *animation.last_direction.peek(); animation.run(last_direction); @@ -828,12 +825,9 @@ where use_memo(move || { let context = context.read(); - if *has_run_yet.peek() - { + if *has_run_yet.peek() { match context.conf.on_deps_change { - OnDepsChange::Finish => { - animation.finish() - } + OnDepsChange::Finish => animation.finish(), OnDepsChange::Rerun => { animation.run(*animation.last_direction.peek()); }