fzf-make 0.74.0

A command line tool that executes commands using fuzzy finder with preview window for make, pnpm, yarn, just, and task.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use std::sync::Mutex;

static PANIC_INFO: Mutex<Option<(String, String)>> = Mutex::new(None);

pub fn set_panic_info(location: String, message: String) {
    if let Ok(mut info) = PANIC_INFO.lock() {
        *info = Some((location, message));
    }
}

pub fn get_panic_info() -> Option<(String, String)> {
    if let Ok(info) = PANIC_INFO.lock() {
        info.clone()
    } else {
        None
    }
}