vtracer_webapp/utils.rs
1extern crate cfg_if;
2
3cfg_if::cfg_if! {
4 // When the `console_error_panic_hook` feature is enabled, we can call the
5 // `set_panic_hook` function to get better error messages if we ever panic.
6 if #[cfg(feature = "console_error_panic_hook")] {
7 extern crate console_error_panic_hook;
8 pub use self::console_error_panic_hook::set_once as set_panic_hook;
9 } else {
10 #[inline]
11 pub fn set_panic_hook() {}
12 }
13}