remove fancypanic as its redundant now.
This commit is contained in:
parent
66fd2ce14e
commit
e2868aed8c
1 changed files with 0 additions and 15 deletions
15
src/main.rs
15
src/main.rs
|
@ -52,8 +52,6 @@ fn dl_json(
|
||||||
}
|
}
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
// enable fancypanic when building for release
|
|
||||||
fancypanic();
|
|
||||||
let args = Args::parse();
|
let args = Args::parse();
|
||||||
let mut executablePath = env::current_exe().unwrap();
|
let mut executablePath = env::current_exe().unwrap();
|
||||||
PathBuf::pop(&mut executablePath);
|
PathBuf::pop(&mut executablePath);
|
||||||
|
@ -275,19 +273,6 @@ fn cook(args: Args, executable_path: &str, mut debug_mode: bool) -> Result<(), E
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
fn fancypanic() {
|
|
||||||
panic::set_hook(Box::new(|panic_info| {
|
|
||||||
let panic_msg = format!("{panic_info}");
|
|
||||||
println!(
|
|
||||||
"{}",
|
|
||||||
panic_msg
|
|
||||||
.lines()
|
|
||||||
.nth(1)
|
|
||||||
.unwrap_or("HOW DID YOU BREAK THE PANIC HANDLER???")
|
|
||||||
);
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
|
|
||||||
fn pass() {}
|
fn pass() {}
|
||||||
|
|
||||||
const ERROR: [&'static str; 7] = [
|
const ERROR: [&'static str; 7] = [
|
||||||
|
|
Loading…
Add table
Reference in a new issue