Browse Source

refactoring: deleted unnecessary variable declaration, spacing

main
fdai7374 2 years ago
committed by fdai7451
parent
commit
be61453730
  1. 5
      src/builtins/help.rs

5
src/builtins/help.rs

@ -27,10 +27,9 @@ impl Builtin for Help {
}
fn split_command(commands: &str) -> Vec<&str> {
let mut splitted_command: Vec<&str> = vec![];
if !commands.is_empty() && commands.trim().len() >= 1 {
splitted_command = commands.trim_start().splitn(2, " ").collect();
return splitted_command
let splitted_command = commands.trim_start().splitn(2, " ").collect();
return splitted_command;
}
return vec!["", ""];
}
Loading…
Cancel
Save