Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
marc2332 committed Jan 12, 2025
1 parent ebeffe1 commit b091d0c
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions crates/hooks/src/use_animation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -779,12 +779,9 @@ pub fn use_animation<Animated: AnimatedValue>(

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);
Expand Down Expand Up @@ -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());
}
Expand Down

0 comments on commit b091d0c

Please sign in to comment.