rust-lang / www.rust-lang.org

The home of the Rust website
https://www.rust-lang.org
Apache License 2.0
362 stars 286 forks source link

Fix warnings printed by Rocket regarding String as parameter type #1907

Closed dtolnay closed 5 months ago

dtolnay commented 5 months ago

I noticed these warnings in the console while testing my governance page changes.

GET /governance/teams/leadership-council text/html:
   >> Matched: (team) GET /governance/<section>/<team> [2]
   >> Note: Using `String` as a parameter type is inefficient. Use `&str` instead.
   >> `String` is used a parameter guard in src/main.rs:224.
   >> Note: Using `String` as a parameter type is inefficient. Use `&str` instead.
   >> `String` is used a parameter guard in src/main.rs:225.
   >> Outcome: Success(200 OK)

GET /tools/install text/html:
   >> Matched: (subject) GET /<category>/<subject> [4]
   >> Note: Using `String` as a parameter type is inefficient. Use `&str` instead.
   >> `String` is used a parameter guard in src/main.rs:260.
   >> Outcome: Success(200 OK)