(&self)
| 31 | |
| 32 | impl Dependency { |
| 33 | pub fn some_dependency(&self) -> fn(String, i32) -> ServiceResponse { |
| 34 | if cfg!(test) { |
| 35 | |_: String, _: i32| -> ServiceResponse { |
| 36 | println!("Some dependency invoked in test environment!"); |
| 37 | ServiceResponse::Empty(()) |
| 38 | } |
| 39 | } else { |
| 40 | |_: String, _: i32| -> ServiceResponse { |
| 41 | println!("Not Test"); |
| 42 | ServiceResponse::Empty(()) |
| 43 | } |
| 44 | } |
| 45 | } |
| 46 | } |
| 47 | |
| 48 | pub type EventHandler<T> = |
nothing calls this directly
no outgoing calls
no test coverage detected