aboutsummaryrefslogtreecommitdiffstats
path: root/crates/turtle/src/atuin_pty_proxy/screen.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/turtle/src/atuin_pty_proxy/screen.rs')
-rw-r--r--crates/turtle/src/atuin_pty_proxy/screen.rs12
1 files changed, 2 insertions, 10 deletions
diff --git a/crates/turtle/src/atuin_pty_proxy/screen.rs b/crates/turtle/src/atuin_pty_proxy/screen.rs
index c51a0c7d..58ebd2eb 100644
--- a/crates/turtle/src/atuin_pty_proxy/screen.rs
+++ b/crates/turtle/src/atuin_pty_proxy/screen.rs
@@ -18,12 +18,7 @@ pub(crate) fn spawn_parser_thread(rows: u16, cols: u16, msg_rx: Receiver<Msg>) {
std::thread::spawn(move || {
let mut parser = vt100::Parser::new(rows, cols, 0);
- loop {
- let first = match msg_rx.recv() {
- Ok(msg) => msg,
- Err(_) => break,
- };
-
+ while let Ok(first) = msg_rx.recv() {
handle_parser_msg(&mut parser, first);
while let Ok(msg) = msg_rx.try_recv() {
@@ -44,10 +39,7 @@ pub(crate) fn spawn_socket_server(sock_path: PathBuf, screen_tx: SyncSender<Msg>
};
for stream in listener.incoming() {
- let mut stream = match stream {
- Ok(s) => s,
- Err(_) => break,
- };
+ let Ok(mut stream) = stream else { break };
let (reply_tx, reply_rx) = mpsc::channel();
if screen_tx.send(Msg::ScreenRequest(reply_tx)).is_err() {