Use format! for better code quality

This commit is contained in:
LDprg 2023-10-07 20:02:26 +02:00
parent dbc5c9a82e
commit 44f40fb276

View File

@ -29,28 +29,28 @@ pub mod freerdp_back {
match app {
Some(exe) => {
xfreerdp.args([
"/app:".to_owned() + exe,
"-wallpaper".to_owned(),
"/d:".to_owned() + &config.rdp.domain,
"/u:".to_owned() + &config.rdp.username,
"/p:".to_owned() + &config.rdp.password,
"/v:".to_owned() + &config.rdp.host,
"/dynamic-resolution".to_owned(),
"+auto-reconnect".to_owned(),
"+clipboard".to_owned(),
"+home-drive".to_owned(),
&format!("/app:{}", exe),
"-wallpaper",
&format!("/d:{}", &config.rdp.domain),
&format!("/u:{}", &config.rdp.username),
&format!("/p:{}", &config.rdp.password),
&format!("/v:{}", &config.rdp.host),
"/dynamic-resolution",
"+auto-reconnect",
"+clipboard",
"+home-drive",
]);
}
None => {
xfreerdp.args([
"/d:".to_owned() + &config.rdp.domain,
"/u:".to_owned() + &config.rdp.username,
"/p:".to_owned() + &config.rdp.password,
"/v:".to_owned() + &config.rdp.host,
"/dynamic-resolution".to_owned(),
"+auto-reconnect".to_owned(),
"+clipboard".to_owned(),
"+home-drive".to_owned(),
&format!("/d:{}", &config.rdp.domain),
&format!("/u:{}", &config.rdp.username),
&format!("/p:{}", &config.rdp.password),
&format!("/v:{}", &config.rdp.host),
"/dynamic-resolution",
"+auto-reconnect",
"+clipboard",
"+home-drive",
]);
}
}