pipedconsole 0.3.2

Easily manage multiple windows consoles from one single process.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

pub(crate) fn error<T: ToString>(message: &str, info: T) -> ! {

    eprintln!("\nA fatal error occured in the process: {}\n\nPress <enter> to exit.", message.replace("{}", &info.to_string()));
    std::io::stdin().read_line(&mut String::new()).unwrap_or_default();
    std::process::exit(2);

}

#[allow(dead_code)]
pub(crate) fn warning<T: ToString>(message: &str, info: T) {

    println!("\nSomething went wrong: {}", message.replace("{}", &info.to_string()));

}