1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
use teloc::inject; #[derive(Debug, PartialEq)] struct City(String); struct WeatherService<'a> { _city: &'a City, } #[inject] impl<'a> WeatherService<'a> { fn new(_city: &'a City, _foo: i32) -> Self { Self { _city } } } #[test] fn test() {}