Skip to content

Commit

Permalink
Properly feature gate the Arbitrary impl on PaMap
Browse files Browse the repository at this point in the history
  • Loading branch information
DRiKE committed May 15, 2024
1 parent 779779c commit cc24811
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/bgp/path_attributes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ impl PaMap {
// Deriving Arbitrary for PaMap results in random u8's pointing to random
// PathAttributes. Those make no sense and .get'ing attributes based on type
// from such a map does not work and/or gives bogus results.
#[cfg(feature = "arbitrary")]
impl arbitrary::Arbitrary<'_> for PaMap {
fn arbitrary(u: &mut arbitrary::Unstructured<'_>) -> arbitrary::Result<Self> {
let num = u.arbitrary_len::<Self>()?;
Expand Down

0 comments on commit cc24811

Please sign in to comment.