p0lunin / teloc

Simple, compile-time DI framework for Rust
Apache License 2.0
150 stars 15 forks source link

Example not working, don't know how to get started #12

Closed sdykae closed 3 years ago

sdykae commented 3 years ago

image

sdykae commented 3 years ago

the same with docs first example image

U007D commented 3 years ago

FYI, @aburkhalter512's PR fixes the broken doc tests, among other things: https://github.com/p0lunin/teloc/pull/13

p0lunin commented 3 years ago

Thanks, i'll check it as soon as i can.

p0lunin commented 3 years ago

Fixed by #13

DanielJoyce commented 2 years ago

Example still doesn't work with 0.2.0

the trait bound `teloc::ServiceProvider<&teloc::ServiceProvider<teloc::service_provider::EmptyServiceProvider, HCons<TransientContainer<Controller>, HCons<SingletonContainer<ConstService>, HNil>>>, HCons<InstanceContainer<{integer}>, HNil>>: teloc::Resolver<'_, _, ConstService, _>` is not satisfied
required because of the requirements on the impl of `GetDependencies<'_, HCons<ConstService, HNil>, HCons<(_, _), HNil>>` for `teloc::ServiceProvider<&teloc::ServiceProvider<teloc::service_provider::EmptyServiceProvider, HCons<TransientContainer<Controller>, HCons<SingletonContainer<ConstService>, HNil>>>, HCons<InstanceContainer<{integer}>, HNil>>`
required because of the requirements on the impl of `teloc::Resolver<'_, TransientContainer<Controller>, Controller, (teloc::index::ParentIndex<teloc::index::SelfIndex<Here>>, HCons<ConstService, HNil>, HCons<(_, _), HNil>)>` for `teloc::ServiceProvider<&teloc::ServiceProvider<teloc::service_provider::EmptyServiceProvider, HCons<TransientContainer<Controller>, HCons<SingletonContainer<ConstService>, HNil>>>, HCons<InstanceContainer<{integer}>, HNil>>`rustc[E0277](https://doc.rust-lang.org/error-index.html#E0277)
❯ rustc --version
rustc 1.58.1 (db9d1b20b 2022-01-20)
DanielJoyce commented 2 years ago

Maybe this issue?

https://github.com/AzureMarker/shaku/issues/30