trigger precommit

This commit is contained in:
LDprg 2023-09-10 21:06:13 +02:00
parent dc2f81cb3d
commit 83c61e999e
2 changed files with 11 additions and 8 deletions

View File

@ -1,6 +1,6 @@
use clap::Command; pub(crate) use clap::Command;
use winapps::RemoteClient;
use winapps::freerdp::freerdp_back::Freerdp; use winapps::freerdp::freerdp_back::Freerdp;
use winapps::RemoteClient;
fn cli() -> Command { fn cli() -> Command {
Command::new("winapps-cli") Command::new("winapps-cli")
@ -16,7 +16,7 @@ fn main() {
let cli = cli(); let cli = cli();
let matches = cli.clone().get_matches(); let matches = cli.clone().get_matches();
let client: &dyn RemoteClient = &Freerdp{}; let client: &dyn RemoteClient = &Freerdp {};
match matches.subcommand() { match matches.subcommand() {
Some(("check", _)) => { Some(("check", _)) => {

View File

@ -1,24 +1,27 @@
pub mod freerdp_back { pub mod freerdp_back {
use std::process::{Command, Stdio}; use std::process::{Command, Stdio};
use crate::{RemoteClient, Config}; use crate::{Config, RemoteClient};
pub struct Freerdp {} pub struct Freerdp {}
impl RemoteClient for Freerdp { impl RemoteClient for Freerdp {
fn check_depends(&self, _config: Config) { fn check_depends(&self, _config: Config) {
let mut xfreerdp = Command::new("xfreerdp"); let mut xfreerdp = Command::new("xfreerdp");
xfreerdp.stdout(Stdio::null()); xfreerdp.stdout(Stdio::null());
xfreerdp.args(["-h"]); 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!("Freerdp found!");
println!("All dependencies found!"); println!("All dependencies found!");
} }
fn run_app(&self, config: Config, _app: &str) { fn run_app(&self, _config: Config, _app: &str) {
todo!() todo!()
} }
} }
} }