audunhalland / entrait

Loosely coupled Rust application design made easy
86 stars 3 forks source link

Using the Borrow trait for borrowing members is a misuse of the API #21

Closed audunhalland closed 1 year ago

audunhalland commented 1 year ago

delegate_by = Borrow should be deprecated in favor of delegate_by = ref, which uses AsRef<dyn Trait> instead of Borrow<dyn Trait>. The Borrow trait is intended for borrowing the "entire" type.