fixed errors printing to stdout instead of stderr
This commit is contained in:
parent
d7fb635a74
commit
0311f85f58
1 changed files with 4 additions and 4 deletions
|
@ -1,24 +1,24 @@
|
|||
use std::process::exit;
|
||||
|
||||
pub fn unmatched_flag(target: String) {
|
||||
println!("pride: no flag {target}");
|
||||
eprintln!("pride: no flag {target}");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
||||
pub fn size_missing() {
|
||||
println!("pride: size flag requires a value");
|
||||
eprintln!("pride: size flag requires a value");
|
||||
exit(2);
|
||||
}
|
||||
|
||||
pub fn size_error(value: &str) {
|
||||
println!("pride: size '{value}' is invalid");
|
||||
eprintln!("pride: size '{value}' is invalid");
|
||||
exit(2);
|
||||
}
|
||||
|
||||
|
||||
pub fn too_small(width: u16, height: u16) {
|
||||
println!("pride: this flag must be bigger than {width}x{height}");
|
||||
eprintln!("pride: this flag must be bigger than {width}x{height}");
|
||||
exit(3);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue