Invalid Route Base on 0.5-rc.1 #1767
-
Trying to build a project with a dynamic path handler. Have found that I can't build even this route: #[get("/hello/<name>")]
fn hello(name: &str) -> String {
format!("Hello, {}!", name)
} I get this error:
What am I missing? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 8 replies
-
Extra info: I can compile with static paths just fine. I'm on WSL 2. Can't seem to compile the hello example with this error:
Although if I compile the example on Windows instead of WSL, it runs just fine. I'll try my project on Windows, but would prefer to stay in WSL. |
Beta Was this translation helpful? Give feedback.
-
You're not showing us the rest of your code. The error indicates that you're writing |
Beta Was this translation helpful? Give feedback.
You're not showing us the rest of your code. The error indicates that you're writing
.mount("/hello/<name>", ...)
elsewhere, which is completely malformed. Even a cursory reading of the documentation, or a proper copying of any of the myriad examples, would resolve and answer your question. Please read the documentation.