Skip to content
This repository was archived by the owner on Jul 19, 2020. It is now read-only.
This repository was archived by the owner on Jul 19, 2020. It is now read-only.

Switch derive macro doesn't handle type parameters #195

@hgzimmerman

Description

@hgzimmerman

Describe the Bug

I want to support the following wrapper:

#[derive(Switch, Debug, Clone)]
#[to="{*:_path}#{route}"]
pub struct FragmentAdapter<T: Switch> {
   _path: String,
    route: T
}

This fails with the error:

    | pub struct FragmentAdapter<T: Switch> {
    |            ^^^^^^^^^^^^^^^ expected 1 type argument

Expected Behavior

This should instead derive Switch for the struct instead of panicking.

Related Info

  • yew-router version: master

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions