aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests
diff options
context:
space:
mode:
authorAram Drevekenin <aram@poor.dev>2020-11-26 10:52:43 +0100
committerAram Drevekenin <aram@poor.dev>2020-11-26 10:52:43 +0100
commit356b9d602bfec493636ee66fa1e8d3a9bb8fe9e7 (patch)
treebf27ced2ed313b85ff3cc2eaed3eca6ea200e3cd /src/tests
parentfix(tests): do not read stdin until we started reading from pty (diff)
downloadsl0ppij-356b9d602bfec493636ee66fa1e8d3a9bb8fe9e7.tar.gz
sl0ppij-356b9d602bfec493636ee66fa1e8d3a9bb8fe9e7.tar.xz
sl0ppij-356b9d602bfec493636ee66fa1e8d3a9bb8fe9e7.zip
style(format): make rustfmt happy
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/fakes.rs14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/tests/fakes.rs b/src/tests/fakes.rs
index f531586e..c920d4d4 100644
--- a/src/tests/fakes.rs
+++ b/src/tests/fakes.rs
@@ -3,8 +3,8 @@ use ::std::collections::HashMap;
use ::std::io::{Read, Write};
use ::std::os::unix::io::RawFd;
use ::std::path::PathBuf;
-use ::std::sync::{Arc, Mutex};
use ::std::sync::atomic::{AtomicBool, Ordering};
+use ::std::sync::{Arc, Mutex};
use ::std::time::{Duration, Instant};
use crate::os_input_output::OsApi;
@@ -29,7 +29,11 @@ pub struct FakeStdinReader {
}
impl FakeStdinReader {
- pub fn new(input_chars: Vec<[u8; 10]>, last_snapshot_time: Arc<Mutex<Instant>>, started_reading_from_pty: Arc<AtomicBool>) -> Self {
+ pub fn new(
+ input_chars: Vec<[u8; 10]>,
+ last_snapshot_time: Arc<Mutex<Instant>>,
+ started_reading_from_pty: Arc<AtomicBool>,
+ ) -> Self {
FakeStdinReader {
input_chars,
read_position: 0,
@@ -256,7 +260,11 @@ impl OsApi for FakeInputOutput {
input_chars.push(*bytes);
}
}
- let reader = FakeStdinReader::new(input_chars, self.last_snapshot_time.clone(), self.started_reading_from_pty.clone());
+ let reader = FakeStdinReader::new(
+ input_chars,
+ self.last_snapshot_time.clone(),
+ self.started_reading_from_pty.clone(),
+ );
Box::new(reader)
}
fn get_stdout_writer(&self) -> Box<dyn Write> {