Replies: 1 comment
-
|
The problem is that the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
Hello, I am new to Rust and Axum.
I am setting up my Hello World project. Here is my example that fails to compile:
Rust analyzer correctly infers the types of

repo,serviceand returningRouter:But rustc complains about the handler's generic arguments:
It is successfully compiled after specifying:
user_login::<UserServiceImpl<UserRepository>>, but I think it is troublesome because every time I modify the injected dependencies I need to modify the generic arguments. Is there any solution or shall I switch to another design pattern?Thank you very much!
axum version
0.8.8
Beta Was this translation helpful? Give feedback.
All reactions