Add missing derives to yew_router's README (#1386)

This commit is contained in:
Teymour Aldridge 2020-07-08 16:29:03 +01:00 committed by GitHub
parent 2ca2085804
commit 679805439a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,7 +4,7 @@ A routing library for the [Yew](https://github.com/yewstack/yew) frontend framew
### Example
```rust
#[derive(Switch, Debug)]
#[derive(Switch, Debug, Clone)]
pub enum AppRoute {
#[to = "/profile/{id}"]
Profile(u32),
@ -14,7 +14,7 @@ pub enum AppRoute {
Index,
}
#[derive(Switch, Debug)]
#[derive(Switch, Debug, Clone)]
pub enum ForumRoute {
#[to = "/{subforum}/{thread_slug}"]
SubForumAndThread{subforum: String, thread_slug: String}