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

Commit

Permalink
Add Routable alias to Switch (#203)
Browse files Browse the repository at this point in the history
  • Loading branch information
hgzimmerman authored Dec 17, 2019
1 parent 20ef3be commit 46d70d1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ pub mod prelude {
pub use crate::router::Router;
pub use crate::{route::Route, service::RouteService};

pub use crate::switch::Switch;
pub use crate::switch::{Switch, Routable};
pub use yew_router_macro::Switch;
// State restrictions
pub use crate::route::RouteState;
Expand Down
6 changes: 6 additions & 0 deletions src/switch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
use crate::{route::Route, RouteState};
use std::fmt::Write;

/// Alias to Switch.
///
/// Eventually Switch will be renamed to Routable and this alias will be removed.
#[allow(bare_trait_objects)]
pub type Routable = Switch;

/// Derivable routing trait that allows instances of implementors to be constructed from Routes.
///
/// # Note
Expand Down

0 comments on commit 46d70d1

Please sign in to comment.