imgbot
Dmitry Sharshakov 3 years ago committed by Blaž Hrastnik
parent fd709bc56d
commit 5fd0a2ddda

@ -272,7 +272,7 @@ impl Client {
.expect("Expected initialized event")
{
Payload::Event(Event { event, .. }) => {
if event == "initialized".to_owned() {
if event == *"initialized" {
Ok(())
} else {
unreachable!()
@ -308,7 +308,7 @@ impl Client {
pub async fn wait_for_stopped(&mut self) -> Result<()> {
match self.server_rx.recv().await.expect("Expected stopped event") {
Payload::Event(Event { event, .. }) => {
if event == "stopped".to_owned() {
if event == *"stopped" {
Ok(())
} else {
unreachable!()

@ -137,12 +137,8 @@ impl Transport {
req: Request,
) -> Result<()> {
let json = serde_json::to_string(&req)?;
match req.back_ch {
Some(back) => {
if let Some(back) = req.back_ch {
self.pending_requests.lock().await.insert(req.seq, back);
()
}
None => {}
}
self.send_string_to_server(server_stdin, json).await
}

Loading…
Cancel
Save