mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-29 12:07:46 +00:00
chore: delete unused macros
This commit is contained in:
parent
cdd74afa3f
commit
a77e92cc96
1 changed files with 0 additions and 56 deletions
|
@ -176,13 +176,6 @@ macro_rules! msg_invalid_input {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
#[macro_export]
|
|
||||||
macro_rules! snippet_no_file_at_path {
|
|
||||||
($path:expr) => {
|
|
||||||
format!("nonexistent path {}", $path)
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
// -- message templates : invalid input : flag
|
// -- message templates : invalid input : flag
|
||||||
|
|
||||||
#[macro_export]
|
#[macro_export]
|
||||||
|
@ -229,55 +222,6 @@ macro_rules! msg_opt_invalid_should_be {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
// -- message templates : invalid input : args
|
|
||||||
|
|
||||||
#[macro_export]
|
|
||||||
macro_rules! msg_arg_invalid_value {
|
|
||||||
($expects:expr, $received:expr) => {
|
|
||||||
msg_invalid_input!(format!(
|
|
||||||
"expects its argument to be {}, but was provided {}",
|
|
||||||
$expects, $received
|
|
||||||
))
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
#[macro_export]
|
|
||||||
macro_rules! msg_args_invalid_value {
|
|
||||||
($expects:expr, $received:expr) => {
|
|
||||||
msg_invalid_input!(format!(
|
|
||||||
"expects its arguments to be {}, but was provided {}",
|
|
||||||
$expects, $received
|
|
||||||
))
|
|
||||||
};
|
|
||||||
($msg:expr) => {
|
|
||||||
msg_invalid_input!($msg)
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
#[macro_export]
|
|
||||||
macro_rules! msg_args_nonexistent_file {
|
|
||||||
($received:expr) => {
|
|
||||||
msg_args_invalid_value!("paths to files", snippet_no_file_at_path!($received))
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
#[macro_export]
|
|
||||||
macro_rules! msg_wrong_number_of_arguments {
|
|
||||||
() => {
|
|
||||||
msg_args_invalid_value!("wrong number of arguments")
|
|
||||||
};
|
|
||||||
($min:expr, $max:expr) => {
|
|
||||||
msg_args_invalid_value!(format!("expects {}-{} arguments", $min, $max))
|
|
||||||
};
|
|
||||||
($exact:expr) => {
|
|
||||||
if $exact == 1 {
|
|
||||||
msg_args_invalid_value!("expects 1 argument")
|
|
||||||
} else {
|
|
||||||
msg_args_invalid_value!(format!("expects {} arguments", $exact))
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
// -- message templates : invalid input : input combinations
|
// -- message templates : invalid input : input combinations
|
||||||
|
|
||||||
#[macro_export]
|
#[macro_export]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue