From 390dbc1f447d8fb4aeac463a656e8ef353bbb45e Mon Sep 17 00:00:00 2001 From: Mika Vilpas Date: Sat, 15 Jun 2024 10:20:52 +0300 Subject: [PATCH] fixup! feat(cli): allow printing selected DDS messages to the console --- yazi-dds/src/client.rs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/yazi-dds/src/client.rs b/yazi-dds/src/client.rs index 4846b88a..698dce6f 100644 --- a/yazi-dds/src/client.rs +++ b/yazi-dds/src/client.rs @@ -71,14 +71,14 @@ impl Client { let mut lines = Self::connect_listener(&kinds).await?; loop { - match lines.next_line().await { - Ok(Some(s)) => { + match lines.next_line().await? { + Some(s) => { let kind = s.split(',').next(); if matches!(kind, Some(kind) if kinds.contains(kind)) { println!("{}", s); } } - Ok(None) => loop { + None => loop { println!("Connection closed"); match Self::connect_listener(&kinds).await { Ok(new_lines) => { @@ -90,10 +90,6 @@ impl Client { } }; }, - Err(e) => { - // could not establish initial connection - return Err(e.into()); - } } } }