Skip to content

Commit 6fcdfdc

Browse files
committed
misc fixes
1 parent c9cf845 commit 6fcdfdc

File tree

7 files changed

+7
-13
lines changed

7 files changed

+7
-13
lines changed

examples/router/src/pages/author.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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 {

examples/router/src/pages/post.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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 {

examples/router/src/pages/post_list.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
use crate::components::{pagination::Pagination, post_card::PostCard};
22
use crate::Routes;
3+
use std::collections::HashMap;
34
use yew::prelude::*;
45
use yew_router::RouterService;
5-
use std::collections::HashMap;
66

77
const ITEMS_PER_PAGE: u64 = 10;
88
const TOTAL_PAGES: u64 = std::u64::MAX / ITEMS_PER_PAGE;

packages/yew-router/Cargo.toml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,3 @@ version = "0.3"
4343
features = [
4444
"HtmlHeadElement",
4545
]
46-
47-
[features]
48-
49-
# internal use only
50-
wasm_test = []

packages/yew-router/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@
5656
pub mod components;
5757
mod current_route;
5858
mod params;
59+
mod routable;
5960
pub mod router;
6061
mod service;
61-
mod routable;
6262
pub mod utils;
6363

6464
pub use current_route::CurrentRoute;

packages/yew-router/tests/parser.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
use std::collections::HashMap;
2-
use wasm_bindgen::{JsCast, JsValue};
32
use wasm_bindgen_test::wasm_bindgen_test as test;
43
use yew::prelude::*;
54
use 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
);

packages/yew-router/tests/router.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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
)

0 commit comments

Comments
 (0)