diff --git a/Cargo.toml b/Cargo.toml index 6d6a9c9..565a7c5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,15 +5,7 @@ edition = "2021" repository = "https://github.com/arena-rs/arena" description = "Framework for holistic economic modelling and simulation of Uniswap v4 strategies, hooks and pools." license-file = "./LICENSE" -exclude = ["contracts", "cli"] - -[lib] -name = "libarena" -path = "src/lib.rs" - -[[bin]] -name = "arena" -path = "src/bin/cli.rs" +exclude = ["contracts"] [dependencies] rug = "1.25.0" diff --git a/src/Cargo.toml b/src/Cargo.toml deleted file mode 100644 index 7520f8e..0000000 --- a/src/Cargo.toml +++ /dev/null @@ -1,9 +0,0 @@ -[package] -name = "src" -version = "0.1.0" -edition = "2021" - -[dependencies] - -[lib] -path = "lib.rs" diff --git a/src/bin/cli.rs b/src/bin/cli.rs deleted file mode 100644 index f328e4d..0000000 --- a/src/bin/cli.rs +++ /dev/null @@ -1 +0,0 @@ -fn main() {} diff --git a/src/engine/inspector.rs b/src/engine/inspector.rs index 3d5fe74..4069e54 100644 --- a/src/engine/inspector.rs +++ b/src/engine/inspector.rs @@ -1,5 +1,5 @@ -use std::fs::OpenOptions; -use std::io::Seek; +use std::{fs::OpenOptions, io::Seek}; + use serde::{Deserialize, Serialize}; /// Trait allowing custom behavior to be defined for logging and inspecting values. @@ -75,10 +75,9 @@ impl Logger { fn append_to_file(&self, record: &LogMessage) -> Result<(), Box> { let mut file = OpenOptions::new() .append(true) - .write(true) .create(true) .open(&self.file_path)?; - + match self.format { LogFormat::Csv => { let mut writer = csv::Writer::from_writer(file); @@ -98,7 +97,7 @@ impl Logger { } } Ok(()) - } + } } impl Inspector for Logger { diff --git a/src/lib.rs b/src/lib.rs index 1ea2ba9..3b39b4e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -211,7 +211,10 @@ mod tests { _signal: Signal, inspector: &mut Box>, ) { - inspector.log(LogMessage::new(String::from("test_key"), String::from("test_value"))); + inspector.log(LogMessage::new( + String::from("test_key"), + String::from("test_value"), + )); } }