Skip to content

Commit

Permalink
Merge pull request #140 from ealmloff/fix-server-function-integer-ove…
Browse files Browse the repository at this point in the history
…rflow

fix server function integer overflow
  • Loading branch information
ealmloff authored Oct 10, 2023
2 parents b964cc6 + 5c5b99f commit c360d35
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/doc_examples/server_function.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ fn App(cx: Scope) -> Element {
}

#[server]
async fn double_server(number: usize) -> Result<usize, ServerFnError> {
async fn double_server(number: i32) -> Result<i32, ServerFnError> {
// Perform some expensive computation or access a database on the server
tokio::time::sleep(std::time::Duration::from_secs(1)).await;
let result = number * 2;
Expand Down

0 comments on commit c360d35

Please sign in to comment.