error : print_error
attend maintenant &str
This commit is contained in:
parent
47b6985816
commit
534de54613
2 changed files with 2 additions and 2 deletions
|
@ -40,7 +40,7 @@ impl Command for UnixProgram {
|
||||||
"{}: command not found",
|
"{}: command not found",
|
||||||
self.command.get_program().to_str().unwrap()
|
self.command.get_program().to_str().unwrap()
|
||||||
);
|
);
|
||||||
print_error(message);
|
print_error(message.as_str());
|
||||||
ExitCode::not_found()
|
ExitCode::not_found()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
use std::path::Path;
|
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 = std::env::args().next().unwrap();
|
||||||
let name = Path::new(&name).file_name().unwrap().to_str().unwrap();
|
let name = Path::new(&name).file_name().unwrap().to_str().unwrap();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue