Skip to content

Commit

Permalink
Use impl trait for builder type
Browse files Browse the repository at this point in the history
  • Loading branch information
tirr-c committed Nov 20, 2018
1 parent a2b4599 commit 3c83d7b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/router.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,7 @@ impl<'a, Data> Resource<'a, Data> {
/// the builder will be local to the subrouter and its descendents.
///
/// If resources are already present, they will be discarded.
pub fn nest<F>(self, builder: F)
where
F: FnOnce(&mut Router<Data>),
{
pub fn nest(self, builder: impl FnOnce(&mut Router<Data>)) {
let mut subrouter = Router {
idx: self.next_router_idx,
table: UrlTable::new(),
Expand Down

0 comments on commit 3c83d7b

Please sign in to comment.