Fix warnings on nightly (#4028)

This commit is contained in:
Jack May
2019-04-26 16:25:13 -07:00
committed by GitHub
parent b912ee7fdf
commit 8b34fd2c75

View File

@ -223,7 +223,6 @@ pub fn flush() {
/// Hook the panic handler to generate a data point on each panic /// Hook the panic handler to generate a data point on each panic
pub fn set_panic_hook(program: &'static str) { pub fn set_panic_hook(program: &'static str) {
use std::panic; use std::panic;
use std::sync::{Once, ONCE_INIT};
static SET_HOOK: Once = ONCE_INIT; static SET_HOOK: Once = ONCE_INIT;
SET_HOOK.call_once(|| { SET_HOOK.call_once(|| {
let default_hook = panic::take_hook(); let default_hook = panic::take_hook();