Skip to content

Commit

Permalink
relax the lifetime requirement on server.at(&str)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbr committed Jun 17, 2020
1 parent 53cf24b commit 6ae095d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ impl<State: Send + Sync + 'static> Server<State> {
/// There is no fallback route matching, i.e. either a resource is a full
/// match or not, which means that the order of adding resources has no
/// effect.
pub fn at<'a>(&'a mut self, path: &'a str) -> Route<'a, State> {
pub fn at<'a>(&'a mut self, path: &str) -> Route<'a, State> {
let router = Arc::get_mut(&mut self.router)
.expect("Registering routes is not possible after the Server has started");
Route::new(router, path.to_owned())
Expand Down

0 comments on commit 6ae095d

Please sign in to comment.