File tree Expand file tree Collapse file tree 7 files changed +7
-13
lines changed
examples/router/src/pages Expand file tree Collapse file tree 7 files changed +7
-13
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ impl Component for Author {
1212 fn create ( _: Self :: Properties , _link : ComponentLink < Self > ) -> Self {
1313 let seed = match RouterService :: current_route ( ) . route ( ) {
1414 Routes :: Author { id } => * id,
15- _ => unreachable ! ( )
15+ _ => unreachable ! ( ) ,
1616 } ;
1717
1818 Self {
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ impl Component for Post {
1313 fn create ( _: Self :: Properties , _link : ComponentLink < Self > ) -> Self {
1414 let seed = match RouterService :: current_route ( ) . route ( ) {
1515 Routes :: Post { id } => * id,
16- _ => unreachable ! ( )
16+ _ => unreachable ! ( ) ,
1717 } ;
1818
1919 Self {
Original file line number Diff line number Diff line change 11use crate :: components:: { pagination:: Pagination , post_card:: PostCard } ;
22use crate :: Routes ;
3+ use std:: collections:: HashMap ;
34use yew:: prelude:: * ;
45use yew_router:: RouterService ;
5- use std:: collections:: HashMap ;
66
77const ITEMS_PER_PAGE : u64 = 10 ;
88const TOTAL_PAGES : u64 = std:: u64:: MAX / ITEMS_PER_PAGE ;
Original file line number Diff line number Diff line change @@ -43,8 +43,3 @@ version = "0.3"
4343features = [
4444 " HtmlHeadElement" ,
4545]
46-
47- [features ]
48-
49- # internal use only
50- wasm_test = []
Original file line number Diff line number Diff line change 5656pub mod components;
5757mod current_route;
5858mod params;
59+ mod routable;
5960pub mod router;
6061mod service;
61- mod routable;
6262pub mod utils;
6363
6464pub use current_route:: CurrentRoute ;
Original file line number Diff line number Diff line change 11use std:: collections:: HashMap ;
2- use wasm_bindgen:: { JsCast , JsValue } ;
32use wasm_bindgen_test:: wasm_bindgen_test as test;
43use yew:: prelude:: * ;
54use yew:: utils:: * ;
@@ -45,8 +44,8 @@ fn test_get_query_params() {
4544 Routes :: Home ,
4645 Some ( {
4746 let mut map = HashMap :: new ( ) ;
48- map. insert ( "foo" , "bar" ) ;
49- map. insert ( "value" , "test" ) ;
47+ map. insert ( "foo" , "bar" . to_string ( ) ) ;
48+ map. insert ( "value" , "test" . to_string ( ) ) ;
5049 map
5150 } ) ,
5251 ) ;
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ fn component() -> Html {
4141 Routes :: No { id : 2 } ,
4242 Some ( {
4343 let mut map = HashMap :: new ( ) ;
44- map. insert ( "foo" , "bar" ) ;
44+ map. insert ( "foo" , "bar" . to_string ( ) ) ;
4545 map
4646 } ) ,
4747 )
You can’t perform that action at this time.
0 commit comments