aboutsummaryrefslogtreecommitdiff
path: root/src/event_loop.rs
diff options
context:
space:
mode:
authorJoe Wilm <joe@jwilm.com>2016-12-16 22:48:04 -0800
committerJoe Wilm <joe@jwilm.com>2016-12-16 22:48:04 -0800
commitbde4dacc791501440515c1a51ad2fcb0256cf04c (patch)
tree66bd6762c4ae11705d1a82ed72112a408e5ec2d5 /src/event_loop.rs
parent781572096ea67516a98872b1b3c5b1ffaea9bae0 (diff)
downloadalacritty-bde4dacc791501440515c1a51ad2fcb0256cf04c.tar.gz
alacritty-bde4dacc791501440515c1a51ad2fcb0256cf04c.zip
Misc formatting fixes
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];