remove some uncessary allocations/copies

This commit is contained in:
Skgland
2025-11-18 21:59:55 +01:00
committed by Bennet Bleßmann
parent 6b5ec3fab8
commit a283c8bdc2
4 changed files with 8 additions and 16 deletions

View File

@@ -1,4 +1,3 @@
use std::collections::BTreeSet;
use std::env;
#[derive(Debug)]
@@ -8,9 +7,8 @@ pub struct MachineArgs {
impl MachineArgs {
pub fn new() -> Self {
let args: BTreeSet<String> = env::args().collect();
Self {
add_history: !args.contains("--no-add-history"),
add_history: env::args().all(|arg| arg != "--no-add-history"),
}
}
}