mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-28 05:53:45 +00:00
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:
commit
d805c74c51
1 changed files with 1 additions and 4 deletions
|
@ -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 a new issue