diff --git a/src/environment.rs b/src/environment.rs index cfe123a..6955767 100644 --- a/src/environment.rs +++ b/src/environment.rs @@ -7,7 +7,7 @@ use std::ffi::{OsStr, OsString}; use std::path::PathBuf; use std::{env, io}; -pub trait Environment: ShellInterface { +pub trait Environment { fn args_os(&self) -> Vec; fn var(&self, key: K) -> Result where diff --git a/src/main.rs b/src/main.rs index 8e3cc84..53dc2d5 100644 --- a/src/main.rs +++ b/src/main.rs @@ -16,7 +16,7 @@ use crate::logger::{LogLevel, Logger}; use crate::os_str_extension::OsStrExtension; use crate::os_string_builder::ReplaceWithOsStr; use crate::server::{RelativeLocalPathAnker, ServerAddress}; -use crate::shell_interface::{ScpParam, ServerCommand, ShellCommand}; +use crate::shell_interface::{ScpParam, ServerCommand, ShellCommand, ShellInterface}; use clap::{Parser, Subcommand, ValueEnum}; use lazy_regex::{lazy_regex, Lazy, Regex}; use server::{Server, ServerReference}; @@ -145,7 +145,7 @@ pub struct Application { impl Application where - E: Environment, + E: Environment + ShellInterface, { pub fn run(&mut self) -> Result<(), String> { let args = Args::try_parse_from(self.environment.args_os()).map_err(|e| e.to_string())?;