tikv / fail-rs

Fail points for rust
Apache License 2.0
332 stars 39 forks source link

Support enabling conditionally fail_points without the third lambda argument #65

Open slinkydeveloper opened 1 year ago

slinkydeveloper commented 1 year ago

Is your feature request related to a problem? Please describe. In most of my failpoints I need to use the condition to enable a fail point, but I rarely use the return feature. Neverthless, I'm forced to use the 3 args version of the macro, defining some return value that makes sense for my function.

Describe the solution you'd like A fail_point two argument macro with name and enable flag, e.g.: fail_point!("my-fail-point", if: enableFlag)