From a6c008d1d8bd11376b724b5fc1ff6caeddfecb21 Mon Sep 17 00:00:00 2001 From: litlep-nibbyt <9344275+litlep-nibbyt@users.noreply.github.com> Date: Thu, 13 Jun 2024 11:20:06 -0400 Subject: [PATCH] newt.rs: changed new_mock output file to allow writes --- rust/ares/src/newt.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rust/ares/src/newt.rs b/rust/ares/src/newt.rs index 2723a09..882fac5 100644 --- a/rust/ares/src/newt.rs +++ b/rust/ares/src/newt.rs @@ -78,7 +78,11 @@ impl Newt { pub fn new_mock() -> Newt { Newt { input: std::fs::File::open("/dev/null").expect("newt: could not open /dev/null"), - output: std::fs::File::open("/dev/null").expect("newt: could not open /dev/null"), + //output: std::fs::File::open("/dev/null").expect("newt: could not open /dev/null"), + output: std::fs::File::options() + .read(true) + .write(true) + .open("/dev/null").expect("newt: could not open /dev/null") } }