Skip to content

Commit

Permalink
Running rustfmt on the new setup
Browse files Browse the repository at this point in the history
  • Loading branch information
spacekookie committed Oct 4, 2018
1 parent 316e101 commit b428118
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 deletions.
16 changes: 7 additions & 9 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,9 @@ pub struct Metadata {
#[macro_export]
macro_rules! setup_panic {
($meta:expr) => {
#[allow(unused_imports)]
use $crate::{handle_dump, print_msg, Metadata};
#[allow(unused_imports)]
use std::panic::{self, PanicInfo};
#[allow(unused_imports)]
use $crate::{handle_dump, print_msg, Metadata};

#[cfg(not(debug_assertions))]
Expand All @@ -108,16 +107,15 @@ macro_rules! setup_panic {
print_msg(file_path, &$meta)
.expect("human-panic: printing error message to console failed");
}));
},
Ok(_) => {},
}
Ok(_) => {}
}
};

() => {
#[allow(unused_imports)]
use $crate::{handle_dump, print_msg, Metadata};
#[allow(unused_imports)]
use std::panic::{self, PanicInfo};
#[allow(unused_imports)]
use $crate::{handle_dump, print_msg, Metadata};

#[cfg(not(debug_assertions))]
Expand All @@ -135,10 +133,10 @@ macro_rules! setup_panic {
print_msg(file_path, &meta)
.expect("human-panic: printing error message to console failed");
}));
},
Ok(_) => {},
}
Ok(_) => {}
}
}
};
}

/// Utility function that prints a message to our human users
Expand Down
1 change: 0 additions & 1 deletion tests/custom-panic/tests/integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,3 @@ fn debug() {
.fails_with(101)
.unwrap();
}

1 change: 0 additions & 1 deletion tests/single-panic/tests/integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,3 @@ fn debug() {
.fails_with(101)
.unwrap();
}

0 comments on commit b428118

Please sign in to comment.