simplify is_exit
check
This commit is contained in:
parent
b75803ad31
commit
41fda76152
@ -21,10 +21,7 @@ pub(crate) fn stdio_transport() -> (Sender<Message>, Receiver<Message>, IoThread
|
|||||||
let stdin = stdin();
|
let stdin = stdin();
|
||||||
let mut stdin = stdin.lock();
|
let mut stdin = stdin.lock();
|
||||||
while let Some(msg) = Message::read(&mut stdin)? {
|
while let Some(msg) = Message::read(&mut stdin)? {
|
||||||
let is_exit = match &msg {
|
let is_exit = matches!(&msg, Message::Notification(n) if n.is_exit());
|
||||||
Message::Notification(n) => n.is_exit(),
|
|
||||||
_ => false,
|
|
||||||
};
|
|
||||||
|
|
||||||
reader_sender.send(msg).unwrap();
|
reader_sender.send(msg).unwrap();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user