fix: #[server] macro error type detection (#2298)

In most cases when you return `Result<..., ServerFnError<E>>` this worked but when you tried
`Result<..., leptos::ServerFnError<E>>` then it didn't.
This commit is contained in:
Marc-Stefan Cassola 2024-02-16 01:20:41 +00:00 committed by GitHub
parent 830fba794e
commit 23bc892a24
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -638,7 +638,7 @@ fn err_type(return_ty: &Type) -> Result<Option<&GenericArgument>> {
{
if let Some(segment) = pat.path.segments.last() {
if segment.ident == "ServerFnError" {
let args = &pat.path.segments[0].arguments;
let args = &segment.arguments;
match args {
// Result<T, ServerFnError>
PathArguments::None => return Ok(None),