aboutsummaryrefslogtreecommitdiff
path: root/src/event_loop.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/event_loop.rs')
-rw-r--r--src/event_loop.rs14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/event_loop.rs b/src/event_loop.rs
index e8e323e4..44d71f94 100644
--- a/src/event_loop.rs
+++ b/src/event_loop.rs
@@ -174,7 +174,14 @@ impl<Io> EventLoop<Io>
}
#[inline]
- fn pty_read<W: Write>(&mut self, state: &mut State, buf: &mut [u8], mut writer: Option<&mut W>) {
+ fn pty_read<W>(
+ &mut self,
+ state: &mut State,
+ buf: &mut [u8],
+ mut writer: Option<&mut W>
+ )
+ where W: Write
+ {
loop {
match self.pty.read(&mut buf[..]) {
Ok(0) => break,
@@ -234,7 +241,10 @@ impl<Io> EventLoop<Io>
}
}
- pub fn spawn(mut self, state: Option<State>) -> thread::JoinHandle<(EventLoop<Io>, State)> {
+ pub fn spawn(
+ mut self,
+ state: Option<State>
+ ) -> thread::JoinHandle<(EventLoop<Io>, State)> {
thread::spawn_named("pty reader", move || {
let mut state = state.unwrap_or_else(Default::default);
let mut buf = [0u8; 4096];