error : print_error attend maintenant &str

This commit is contained in:
Ahurac 2024-04-11 21:34:41 +02:00
parent 47b6985816
commit 534de54613
2 changed files with 2 additions and 2 deletions

View file

@ -40,7 +40,7 @@ impl Command for UnixProgram {
"{}: command not found",
self.command.get_program().to_str().unwrap()
);
print_error(message);
print_error(message.as_str());
ExitCode::not_found()
}
}

View file

@ -1,6 +1,6 @@
use std::path::Path;
pub fn print_error(message: String) {
pub fn print_error(message: &str) {
let name = std::env::args().next().unwrap();
let name = Path::new(&name).file_name().unwrap().to_str().unwrap();