diff options
author | Jesse Luehrs <doy@tozt.net> | 2019-10-24 06:33:51 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2019-10-24 06:33:51 -0400 |
commit | 6552f2d69eb0f19851dbebd21742b7bc9f37cc42 (patch) | |
tree | 164af15b47d0caaf274b51323ba1daab42ff8be4 /src/resize.rs | |
parent | e9f475a611140d781bfb80fe18958374d7a54296 (diff) | |
download | teleterm-6552f2d69eb0f19851dbebd21742b7bc9f37cc42.tar.gz teleterm-6552f2d69eb0f19851dbebd21742b7bc9f37cc42.zip |
move component_future to a separate crate
Diffstat (limited to 'src/resize.rs')
-rw-r--r-- | src/resize.rs | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/resize.rs b/src/resize.rs index 9e357af..2dcf928 100644 --- a/src/resize.rs +++ b/src/resize.rs @@ -62,26 +62,25 @@ impl<R: tokio::io::AsyncRead + 'static> ResizingProcess<R> { &'static [&'static dyn for<'a> Fn( &'a mut Self, ) - -> crate::component_future::Poll< + -> component_future::Poll< Option<Event<R>>, Error, >] = &[&Self::poll_resize, &Self::poll_process]; fn poll_resize( &mut self, - ) -> crate::component_future::Poll<Option<Event<R>>, Error> { - let size = try_ready!(self.resizer.poll()).unwrap(); + ) -> component_future::Poll<Option<Event<R>>, Error> { + let size = component_future::try_ready!(self.resizer.poll()).unwrap(); self.process.resize(size.clone()); - Ok(crate::component_future::Async::Ready(Some(Event::Resize( - size, - )))) + Ok(component_future::Async::Ready(Some(Event::Resize(size)))) } fn poll_process( &mut self, - ) -> crate::component_future::Poll<Option<Event<R>>, Error> { - Ok(crate::component_future::Async::Ready( - try_ready!(self.process.poll()).map(Event::Process), + ) -> component_future::Poll<Option<Event<R>>, Error> { + Ok(component_future::Async::Ready( + component_future::try_ready!(self.process.poll()) + .map(Event::Process), )) } } @@ -95,6 +94,6 @@ impl<R: tokio::io::AsyncRead + 'static> futures::stream::Stream <crate::process::Process<R> as futures::stream::Stream>::Error; fn poll(&mut self) -> futures::Poll<Option<Self::Item>, Self::Error> { - crate::component_future::poll_stream(self, Self::POLL_FNS) + component_future::poll_stream(self, Self::POLL_FNS) } } |