From 878e31f30cdb9c4f198be63c764205a3de7e8c67 Mon Sep 17 00:00:00 2001 From: Michael Aaron Murphy Date: Wed, 18 Aug 2021 14:01:25 +0200 Subject: [PATCH] improv(plugins): crate::send shall use write_all instead of write --- plugins/src/lib.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugins/src/lib.rs b/plugins/src/lib.rs index 0f7339c..a31d8d1 100644 --- a/plugins/src/lib.rs +++ b/plugins/src/lib.rs @@ -13,8 +13,7 @@ use std::ffi::OsStr; pub async fn send(tx: &mut W, response: PluginResponse) { if let Ok(mut bytes) = serde_json::to_string(&response) { bytes.push('\n'); - let _ = tx.write(bytes.as_bytes()).await; - let _ = tx.flush().await; + let _ = tx.write_all(bytes.as_bytes()).await; } }