Skip to content

Commit

Permalink
Error type detection only worked without type path
Browse files Browse the repository at this point in the history
In most cases when you return `Result<..., ServerFnError<E>>` this worked but when you tried
`Result<..., leptos::ServerFnError<E>>` then it didn't.
  • Loading branch information
maccesch authored Feb 13, 2024
1 parent 0658a55 commit 93b58e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server_fn_macro/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit 93b58e6

Please sign in to comment.