Skip to content

Commit

Permalink
Remove all rust 2015 style "extern crate" statements
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulGrandperrin committed Feb 2, 2019
1 parent b5f2033 commit d6db565
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
4 changes: 1 addition & 3 deletions example/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#[macro_use] extern crate honggfuzz;

fn main() {
// Here you can parse `std::env::args and
// setup / initialize your project
Expand All @@ -17,7 +15,7 @@ fn main() {
// For performance, it is recommended that you use the native type
// `&[u8]` when possible.
// Here, this slice will contain a "random" quantity of "random" data.
fuzz!(|data: &[u8]| {
honggfuzz::fuzz!(|data: &[u8]| {
// Try to access the global state across the unwind boundary
some_global_state += 1;

Expand Down
10 changes: 2 additions & 8 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,13 +208,7 @@
//! This crate was inspired by those projects!

/// Re-export of arbitrary crate used to generate structured inputs
pub extern crate arbitrary;

#[cfg(all(fuzzing, not(fuzzing_debug)))]
#[macro_use] extern crate lazy_static;

#[cfg(all(fuzzing, fuzzing_debug))]
extern crate memmap;
pub use arbitrary;

#[cfg(all(fuzzing, not(fuzzing_debug)))]
extern "C" {
Expand Down Expand Up @@ -261,7 +255,7 @@ pub fn fuzz<F>(closure: F) where F: FnOnce(&[u8]) {
// It is useful to abort before unwinding so that the fuzzer will then be
// able to analyse the process stack frames to tell different bugs appart.
#[cfg(all(fuzzing, not(fuzzing_debug)))]
lazy_static! {
lazy_static::lazy_static! {
static ref PANIC_HOOK: () = {
std::panic::set_hook(Box::new(|_| {
std::process::abort();
Expand Down

0 comments on commit d6db565

Please sign in to comment.