Skip to content

Commit

Permalink
clippy: simplify Box::pin() call. (#718)
Browse files Browse the repository at this point in the history
  • Loading branch information
martinfrances107 authored Mar 21, 2023
1 parent 2e63bb1 commit cfd5c98
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion leptos_server/src/action.rs
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ where
let pending = create_rw_signal(cx, false);
let action_fn = Rc::new(move |input: &I| {
let fut = action_fn(input);
Box::pin(async move { fut.await }) as Pin<Box<dyn Future<Output = O>>>
Box::pin(fut) as Pin<Box<dyn Future<Output = O>>>
});

Action(store_value(
Expand Down
2 changes: 1 addition & 1 deletion leptos_server/src/multi_action.rs
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ where
let submissions = create_rw_signal(cx, Vec::new());
let action_fn = Rc::new(move |input: &I| {
let fut = action_fn(input);
Box::pin(async move { fut.await }) as Pin<Box<dyn Future<Output = O>>>
Box::pin(fut) as Pin<Box<dyn Future<Output = O>>>
});

MultiAction(store_value(
Expand Down

0 comments on commit cfd5c98

Please sign in to comment.