Skip to content

Commit a3959f7

Browse files
committed
Minor cleanups
1 parent db1595d commit a3959f7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/lib.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ use std::fmt;
99
use conduit::{Handler, Method, Request, Response};
1010
use router::{Match, Router};
1111

12+
#[derive(Default)]
1213
pub struct RouteBuilder {
1314
routers: HashMap<Method, Router<Box<dyn Handler>>>,
1415
}
@@ -109,7 +110,7 @@ pub trait RequestParams<'a> {
109110
fn params(self) -> &'a router::Params;
110111
}
111112

112-
pub fn params<'a>(req: &'a dyn Request) -> &'a router::Params {
113+
pub fn params(req: &dyn Request) -> &router::Params {
113114
req.extensions()
114115
.find::<router::Params>()
115116
.expect("Missing params")
@@ -144,7 +145,7 @@ mod tests {
144145
RequestSentinel {
145146
path: path.to_string(),
146147
extensions: TypeMap::new(),
147-
method: method,
148+
method,
148149
}
149150
}
150151
}

0 commit comments

Comments
 (0)