Skip to content

Commit

Permalink
Ensure uniqueness of
Browse files Browse the repository at this point in the history
  • Loading branch information
k88hudson-cfa committed Aug 20, 2024
1 parent 1d01a69 commit 377efb2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/random.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ macro_rules! define_rng {
stringify!($random_id)
}
}

// This ensures that you can't define two RngIds with the same name
#[doc(hidden)]
#[no_mangle]
pub static $random_id: () = ();
};
}
pub use define_rng;
Expand Down

0 comments on commit 377efb2

Please sign in to comment.