builtins : suppression if inutile

This commit is contained in:
Ahurac 2024-04-23 13:55:00 +02:00
parent 006dc28466
commit 13555cafb3

View file

@ -57,10 +57,8 @@ pub(crate) fn exit(args: &Vec<String>, _variables: &mut Variables, exit_code: &m
} }
pub(super) fn unset(args: &Vec<String>, variables: &mut Variables, exit_code: &mut ExitCode) { pub(super) fn unset(args: &Vec<String>, variables: &mut Variables, exit_code: &mut ExitCode) {
if !args.is_empty() { for variable_name in args.iter() {
for variable_name in args.iter() { variables.unset(variable_name);
variables.unset(variable_name);
}
} }
exit_code.set_success(); exit_code.set_success();