mirror of
https://github.com/rwf2/Rocket.git
synced 2025-02-16 05:32:03 +00:00
Don't need the type since we use unwrap_or.
This commit is contained in:
parent
877b37c903
commit
1e9c0789f6
@ -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))
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user