Skip to content

Commit

Permalink
Make linters happy in release mode
Browse files Browse the repository at this point in the history
  • Loading branch information
temeddix committed Feb 1, 2024
1 parent b67c1f1 commit f7085a3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
use super::SharedCell;
use crate::debug_print;
use crate::tokio::runtime::Builder;
use crate::tokio::runtime::Runtime;
use allo_isolate::IntoDart;
use allo_isolate::Isolate;
use allo_isolate::ZeroCopyBuffer;
use rinf::externs::backtrace::Backtrace;
use rinf::externs::os_thread_local::ThreadLocal;
use std::cell::RefCell;
use std::panic::catch_unwind;
Expand Down Expand Up @@ -38,6 +36,8 @@ pub extern "C" fn start_rust_logic_extern() {
// Enable backtrace output for panics.
#[cfg(debug_assertions)]
{
use crate::debug_print;
use rinf::externs::backtrace::Backtrace;
std::panic::set_hook(Box::new(|panic_info| {
let backtrace = Backtrace::new();
debug_print!("A panic occurred in Rust.\n{panic_info}\n{backtrace:?}");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use crate::debug_print;
use crate::tokio;
use rinf::externs::js_sys::Uint8Array;
use std::panic::catch_unwind;
Expand All @@ -10,6 +9,7 @@ pub fn start_rust_logic_extern() {
// Add kind description for panics.
#[cfg(debug_assertions)]
{
use crate::debug_print;
std::panic::set_hook(Box::new(|panic_info| {
debug_print!("A panic occurred in Rust.\n{panic_info}");
}));
Expand Down

0 comments on commit f7085a3

Please sign in to comment.