From b42811884e98eb142c54709a27ba1ebaaf6b42d7 Mon Sep 17 00:00:00 2001 From: Katharina Fey Date: Thu, 4 Oct 2018 19:28:57 +0200 Subject: [PATCH] Running rustfmt on the new setup --- src/lib.rs | 16 +++++++--------- tests/custom-panic/tests/integration.rs | 1 - tests/single-panic/tests/integration.rs | 1 - 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index eb05dfd..32c996c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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))] @@ -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))] @@ -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 diff --git a/tests/custom-panic/tests/integration.rs b/tests/custom-panic/tests/integration.rs index 68a7488..199fc09 100644 --- a/tests/custom-panic/tests/integration.rs +++ b/tests/custom-panic/tests/integration.rs @@ -23,4 +23,3 @@ fn debug() { .fails_with(101) .unwrap(); } - diff --git a/tests/single-panic/tests/integration.rs b/tests/single-panic/tests/integration.rs index cd76045..e2b629d 100644 --- a/tests/single-panic/tests/integration.rs +++ b/tests/single-panic/tests/integration.rs @@ -21,4 +21,3 @@ fn debug() { .fails_with(101) .unwrap(); } -