Update common.rs

This commit is contained in:
RustDesk 2024-01-30 18:29:04 +08:00 committed by GitHub
parent 42cdfb0885
commit 70242e6eb2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -78,7 +78,7 @@ pub fn init_args(args: &str, name: &str, about: &str) {
} }
} }
for (k, v) in matches.args { for (k, v) in matches.args {
if let Some(v) = v.vals.get(0) { if let Some(v) = v.vals.first() {
std::env::set_var(arg_name(k), v.to_string_lossy().to_string()); std::env::set_var(arg_name(k), v.to_string_lossy().to_string());
} }
} }