fix: avoid collecting to unneeded VecDequeue

This commit is contained in:
Erica Marigold 2024-01-04 18:33:51 +05:30
parent 75152bd384
commit 53b53a27fd
No known key found for this signature in database
GPG key ID: 2768CC0C23D245D1

View file

@ -1,10 +1,4 @@
use std::{
collections::VecDeque,
env,
ops::ControlFlow,
process::{self, ExitCode},
sync::Mutex,
};
use std::{env, ops::ControlFlow, process::ExitCode, sync::Mutex};
use lune::Lune;
@ -94,8 +88,8 @@ pub async fn run_standalone(signature: Vec<u8>, bin: Vec<u8>) -> Result<ExitCode
// If we were able to retrieve the required metadata, we load
// and execute the bytecode
let mut args = env::args().collect::<VecDeque<String>>();
args.pop_front();
// Skip the first argument which is the path to current executable
let args = env::args().skip(1).collect::<Vec<_>>();
let result = Lune::new()
.with_args(args)