From 5c5b99f5838796d11b9fde51963d6b206bda4ec8 Mon Sep 17 00:00:00 2001 From: Evan Almloff Date: Tue, 10 Oct 2023 10:44:10 -0500 Subject: [PATCH] fix server function integer overflow --- src/doc_examples/server_function.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/doc_examples/server_function.rs b/src/doc_examples/server_function.rs index a1403ed8a..df9665c93 100644 --- a/src/doc_examples/server_function.rs +++ b/src/doc_examples/server_function.rs @@ -36,7 +36,7 @@ fn App(cx: Scope) -> Element { } #[server] -async fn double_server(number: usize) -> Result { +async fn double_server(number: i32) -> Result { // 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;