Skip to content

Commit

Permalink
misc fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ranile committed Mar 31, 2021
1 parent c9cf845 commit 53adbee
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion examples/router/src/pages/author.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ impl Component for Author {
fn create(_: Self::Properties, _link: ComponentLink<Self>) -> Self {
let seed = match RouterService::current_route().route() {
Routes::Author { id } => *id,
_ => unreachable!()
_ => unreachable!(),
};

Self {
Expand Down
2 changes: 1 addition & 1 deletion examples/router/src/pages/post.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ impl Component for Post {
fn create(_: Self::Properties, _link: ComponentLink<Self>) -> Self {
let seed = match RouterService::current_route().route() {
Routes::Post { id } => *id,
_ => unreachable!()
_ => unreachable!(),
};

Self {
Expand Down
2 changes: 1 addition & 1 deletion examples/router/src/pages/post_list.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use crate::components::{pagination::Pagination, post_card::PostCard};
use crate::Routes;
use std::collections::HashMap;
use yew::prelude::*;
use yew_router::RouterService;
use std::collections::HashMap;

const ITEMS_PER_PAGE: u64 = 10;
const TOTAL_PAGES: u64 = std::u64::MAX / ITEMS_PER_PAGE;
Expand Down
2 changes: 1 addition & 1 deletion packages/yew-router/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@
pub mod components;
mod current_route;
mod params;
mod routable;
pub mod router;
mod service;
mod routable;
pub mod utils;

pub use current_route::CurrentRoute;
Expand Down
5 changes: 2 additions & 3 deletions packages/yew-router/tests/parser.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use std::collections::HashMap;
use wasm_bindgen::{JsCast, JsValue};
use wasm_bindgen_test::wasm_bindgen_test as test;
use yew::prelude::*;
use yew::utils::*;
Expand Down Expand Up @@ -45,8 +44,8 @@ fn test_get_query_params() {
Routes::Home,
Some({
let mut map = HashMap::new();
map.insert("foo", "bar");
map.insert("value", "test");
map.insert("foo", "bar".to_string());
map.insert("value", "test".to_string());
map
}),
);
Expand Down
2 changes: 1 addition & 1 deletion packages/yew-router/tests/router.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ fn component() -> Html {
Routes::No { id: 2 },
Some({
let mut map = HashMap::new();
map.insert("foo", "bar");
map.insert("foo", "bar".to_string());
map
}),
)
Expand Down

0 comments on commit 53adbee

Please sign in to comment.