mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
fixup! feat(cli): allow printing selected DDS messages to the console
This commit is contained in:
parent
2d3cd4d50e
commit
390dbc1f44
1 changed files with 3 additions and 7 deletions
|
|
@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue