What is the difference between &Trait and impl Trait when used as method arguments?
问题 In my project so far, I use many traits to permit mocking/stubbing in unit tests for injected dependencies. However, one detail of what I'm doing so far seems so suspicious that I'm surprised it even compiles. I'm worried that something dangerous is going on that I don't see or understand. It's based on the difference between these two method signatures: fn confirm<T>(subject: &MyTrait<T>) ... fn confirm<T>(subject: impl MyTrait<T>) ... I only just discovered the impl ... syntax in method