HampusMat / Syrette

The convenient dependency injection library for Rust. Mirror of https://git.hampusmat.com/syrette
https://git.hampusmat.com/syrette
Apache License 2.0
20 stars 3 forks source link

Remove DI container interface traits #14

Closed HampusMat closed 1 year ago

HampusMat commented 1 year ago

The traits IDIContainer and IAsyncDIContainer should be removed. They were created so that DIContainer and AsyncDIContainer can be mocked but it's much more ergonomic to just replace the whole struct. I don't know why i didn't do it that way.

HampusMat commented 1 year ago

It doesn't work when structs which uses a DI container sometimes should get a mocked version and sometimes not