mirror of
https://gitlab.com/comunic/comunicapiv3
synced 2024-11-22 21:39:21 +00:00
Fix array indexing issue
This commit is contained in:
parent
d1d0f5818f
commit
21729fc877
@ -86,7 +86,10 @@ async fn main() -> std::io::Result<()> {
|
|||||||
std::process::exit(-2);
|
std::process::exit(-2);
|
||||||
}
|
}
|
||||||
|
|
||||||
let args = &args[3..];
|
let args = match args.len() {
|
||||||
|
0 | 1 | 2 => vec![],
|
||||||
|
_ => (&args[3..]).to_vec()
|
||||||
|
};
|
||||||
|
|
||||||
let res = (selected_action.function)(args.to_vec());
|
let res = (selected_action.function)(args.to_vec());
|
||||||
res.expect("Failed to execute action!");
|
res.expect("Failed to execute action!");
|
||||||
|
Loading…
Reference in New Issue
Block a user