Skip to content

Commit

Permalink
fix server function integer overflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ealmloff committed Oct 10, 2023
1 parent bcf061e commit 5c5b99f
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 5c5b99f

Please sign in to comment.