From a83b0d053d7ec6f4508c767b7320dd3d35bf72ba Mon Sep 17 00:00:00 2001 From: Nicolas Guichard Date: Sat, 16 Nov 2024 03:16:41 +0100 Subject: [PATCH] Enable building any ServerFnError using ServerFnError::::new Previously it was only possible to build the `NoCustomError` case this way. --- server_fn/src/error.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server_fn/src/error.rs b/server_fn/src/error.rs index 63d73b9005..3bd17b36a2 100644 --- a/server_fn/src/error.rs +++ b/server_fn/src/error.rs @@ -181,7 +181,7 @@ pub enum ServerFnError { MissingArg(String), } -impl ServerFnError { +impl ServerFnError { /// Constructs a new [`ServerFnError::ServerError`] from some other type. pub fn new(msg: impl ToString) -> Self { Self::ServerError(msg.to_string())