diff --git a/agent/lib/src/runner_engine/model.rs b/agent/lib/src/runner_engine/model.rs index 84d3037..47358be 100644 --- a/agent/lib/src/runner_engine/model.rs +++ b/agent/lib/src/runner_engine/model.rs @@ -1,10 +1,4 @@ -use anyhow::Result; -use std::{ - fs::File, - io::{Read, Write}, - path::Path, - path::PathBuf, -}; +use std::path::PathBuf; use serde::{Deserialize, Serialize}; @@ -55,32 +49,3 @@ impl CodeReturn { } } } - -/// A trait responsible for CRU operations on files and dir -/// Mainly used in tests to mock file operations -trait FileHandler: Read + Write { - fn create>(path: P) -> Result - where - Self: Sized; - fn read>(path: P) -> Result - where - Self: Sized; -} - -impl FileHandler for File { - fn create>(path: P) -> Result - where - Self: Sized, - { - let file = File::create(path)?; - Ok(file) - } - - fn read>(path: P) -> Result - where - Self: Sized, - { - let file = File::open(path)?; - Ok(file) - } -}