Hello folks,
I am currently creating my Rust server using Rocket and
#[get("/hello/<name>")]
fn hello(name: String) -> String {
format!("Hello, {} !", name)
}
And when i send request to: http://127.0.0.1/hello/test
I get
š Rocket has launched from http://127.0.0.1:8000
GET /hello/test:
>> Matched: (hello) GET /v1/item/create/<name>
>> Note: Using `String` as a parameter type is inefficient. Use `&str` instead.
>> `String` is used a parameter guard in src/main.rs:24.
>> Outcome: Success(200 OK)
>> Response succeeded.
Without changing the String to &str how can i suppress these two messages: Note: Using String as a parameter type is inefficient. Use &str instead. >> String is used a parameter guard in src/main.rs:24.
Thank you.