Auto merge of #14064 - WaffleLapkin:simplify_is_exit_check, r=lnicola

minor: Simplify `is_exit` check in `lsp-server`

(this is what `socket` one does)
This commit is contained in:
bors 2023-01-31 11:34:19 +00:00
commit d805c74c51

View file

@ -21,10 +21,7 @@ pub(crate) fn stdio_transport() -> (Sender<Message>, Receiver<Message>, IoThread
let stdin = stdin();
let mut stdin = stdin.lock();
while let Some(msg) = Message::read(&mut stdin)? {
let is_exit = match &msg {
Message::Notification(n) => n.is_exit(),
_ => false,
};
let is_exit = matches!(&msg, Message::Notification(n) if n.is_exit());
reader_sender.send(msg).unwrap();