Don't need the type since we use unwrap_or.

This commit is contained in:
Sergio Benitez 2016-03-22 16:28:45 -07:00
parent 877b37c903
commit 1e9c0789f6
1 changed files with 1 additions and 1 deletions

View File

@ -4,7 +4,7 @@ use rocket::{Rocket, Request, Response, Route};
use rocket::Method::*;
fn root(req: Request) -> Response<'static> {
let name = req.get_param::<&str>(0).unwrap_or("unnamed");
let name = req.get_param(0).unwrap_or("unnamed");
Response::new(format!("Hello, {}!", name))
}