From 83c61e999efc97eb351b5d3dc255e855f840dbd7 Mon Sep 17 00:00:00 2001 From: LDprg Date: Sun, 10 Sep 2023 21:06:13 +0200 Subject: [PATCH] trigger precommit --- winapps-cli/src/main.rs | 6 +++--- winapps/src/freerdp.rs | 13 ++++++++----- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/winapps-cli/src/main.rs b/winapps-cli/src/main.rs index b82f71d..fba3b81 100644 --- a/winapps-cli/src/main.rs +++ b/winapps-cli/src/main.rs @@ -1,6 +1,6 @@ -use clap::Command; -use winapps::RemoteClient; +pub(crate) use clap::Command; use winapps::freerdp::freerdp_back::Freerdp; +use winapps::RemoteClient; fn cli() -> Command { Command::new("winapps-cli") @@ -16,7 +16,7 @@ fn main() { let cli = cli(); let matches = cli.clone().get_matches(); - let client: &dyn RemoteClient = &Freerdp{}; + let client: &dyn RemoteClient = &Freerdp {}; match matches.subcommand() { Some(("check", _)) => { diff --git a/winapps/src/freerdp.rs b/winapps/src/freerdp.rs index 3ef7333..aedbfd8 100644 --- a/winapps/src/freerdp.rs +++ b/winapps/src/freerdp.rs @@ -1,24 +1,27 @@ pub mod freerdp_back { use std::process::{Command, Stdio}; - use crate::{RemoteClient, Config}; + use crate::{Config, RemoteClient}; pub struct Freerdp {} impl RemoteClient for Freerdp { fn check_depends(&self, _config: Config) { - let mut xfreerdp = Command::new("xfreerdp"); xfreerdp.stdout(Stdio::null()); xfreerdp.args(["-h"]); - xfreerdp.spawn().expect("Freerdp execution failed! It needs to be installed!"); + xfreerdp + .spawn() + .expect("Freerdp execution failed! It needs to be installed!"); println!("Freerdp found!"); - + println!("All dependencies found!"); } - fn run_app(&self, config: Config, _app: &str) { + fn run_app(&self, _config: Config, _app: &str) { todo!() } } } + +