summaryrefslogtreecommitdiffstats
path: root/src/state/history/pty.rs
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2022-01-05 07:01:08 -0500
committerJesse Luehrs <doy@tozt.net>2022-01-05 07:01:08 -0500
commit404ae6202e24c7bfc5625edb3ac064df4ecd105f (patch)
tree1177bdc4c2b4f8d857bf3d5630ee82fd2e4ccdd3 /src/state/history/pty.rs
parente893d7cb8ca855e2843f60ec0b1045510e1577cf (diff)
downloadnbsh-404ae6202e24c7bfc5625edb3ac064df4ecd105f.tar.gz
nbsh-404ae6202e24c7bfc5625edb3ac064df4ecd105f.zip
shorten some names
Diffstat (limited to 'src/state/history/pty.rs')
-rw-r--r--src/state/history/pty.rs14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/state/history/pty.rs b/src/state/history/pty.rs
index 96be550..146cf68 100644
--- a/src/state/history/pty.rs
+++ b/src/state/history/pty.rs
@@ -12,7 +12,7 @@ impl Pty {
entry: &async_std::sync::Arc<async_std::sync::Mutex<super::Entry>>,
input_r: async_std::channel::Receiver<Vec<u8>>,
resize_r: async_std::channel::Receiver<(u16, u16)>,
- event_w: async_std::channel::Sender<crate::event::Event>,
+ event_w: async_std::channel::Sender<crate::Event>,
) -> anyhow::Result<Self> {
let (close_w, close_r) = async_std::channel::unbounded();
@@ -50,7 +50,7 @@ async fn pty_task(
input_r: async_std::channel::Receiver<Vec<u8>>,
resize_r: async_std::channel::Receiver<(u16, u16)>,
close_r: async_std::channel::Receiver<()>,
- event_w: async_std::channel::Sender<crate::event::Event>,
+ event_w: async_std::channel::Sender<crate::Event>,
) {
loop {
enum Res {
@@ -68,10 +68,7 @@ async fn pty_task(
Res::Read(res) => match res {
Ok(bytes) => {
entry.lock_arc().await.process(&buf[..bytes]);
- event_w
- .send(crate::event::Event::PtyOutput)
- .await
- .unwrap();
+ event_w.send(crate::Event::PtyOutput).await.unwrap();
}
Err(e) => {
if e.raw_os_error() != Some(libc::EIO) {
@@ -98,10 +95,7 @@ async fn pty_task(
},
Res::Close(res) => match res {
Ok(()) => {
- event_w
- .send(crate::event::Event::PtyClose)
- .await
- .unwrap();
+ event_w.send(crate::Event::PtyClose).await.unwrap();
return;
}
Err(e) => {