Skip to content

Instantly share code, notes, and snippets.

@lewsmith
lewsmith / fix_coverage.rs
Last active July 5, 2024 16:51
Rust `await` coverage temporary fix
/// This is a temporary fix for a bug in coverage reports where awaits show as not covered.
///
/// The idea is that once the bug is fixed, you can easily remove all `.fix_cov()` calls and imports,
/// delete the `fix_coverage.rs` and eveything works as it previouslt did.
///
/// To use it just simply import the `FixCov` trait and add `.fix_cov` to any future, before the `.await`.
///
/// # Example
/// ```
/// use FixCov;