diff options
author | Joe Wilm <joe@jwilm.com> | 2016-12-16 22:48:04 -0800 |
---|---|---|
committer | Joe Wilm <joe@jwilm.com> | 2016-12-16 22:48:04 -0800 |
commit | bde4dacc791501440515c1a51ad2fcb0256cf04c (patch) | |
tree | 66bd6762c4ae11705d1a82ed72112a408e5ec2d5 /src/event_loop.rs | |
parent | 781572096ea67516a98872b1b3c5b1ffaea9bae0 (diff) | |
download | alacritty-bde4dacc791501440515c1a51ad2fcb0256cf04c.tar.gz alacritty-bde4dacc791501440515c1a51ad2fcb0256cf04c.zip |
Misc formatting fixes
Diffstat (limited to 'src/event_loop.rs')
-rw-r--r-- | src/event_loop.rs | 14 |
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]; |