From b6a6e6335898064bd17e6a6c2a5b50ee71a63aaf Mon Sep 17 00:00:00 2001 From: Steppy Date: Fri, 7 Feb 2025 14:10:13 +0100 Subject: [PATCH] Revert Environment needing to be ShellInterface --- src/environment.rs | 2 +- src/main.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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())?;