Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(fuzz): add #[cfg(fuzzing)] #1948

Closed
wants to merge 1 commit into from

Commits on Jul 31, 2024

  1. refactor(fuzz): add #[cfg(fuzzing)]

    `quinn-proto` exposes some hooks for fuzzing only. These are behind a `#[cfg(fuzzing)]`.
    
    The `fuzz` crate imports these hooks, but without the `#[cfg(fuzzing)]`.
    
    Running `cargo check --workspace` thus fails importing each of these hooks. For example:
    
    ```
    error[E0432]: unresolved import `proto::fuzzing`
      --> fuzz/fuzz_targets/packet.rs:7:5
       |
    7  |     fuzzing::{PacketParams, PartialDecode},
       |     ^^^^^^^ could not find `fuzzing` in `proto`
    ```
    
    This commit adds the various `#[cfg(fuzzing)]` to `fuzz/`, preventing the above errors.
    mxinden committed Jul 31, 2024
    Configuration menu
    Copy the full SHA
    793e2c4 View commit details
    Browse the repository at this point in the history