Ajout : module error

This commit is contained in:
Ahurac 2024-04-10 09:59:46 +02:00
parent 1de0e1674e
commit 802e97387a

8
src/error.rs Normal file
View file

@ -0,0 +1,8 @@
use std::path::Path;
pub fn print_error(message: String) {
let name = std::env::args().next().unwrap();
let name = Path::new(&name).file_name().unwrap().to_str().unwrap();
eprintln!("{}: {}", name, message);
}