improv(plugins): crate::send shall use write_all instead of write
This commit is contained in:
parent
4a45257472
commit
878e31f30c
1 changed files with 1 additions and 2 deletions
|
|
@ -13,8 +13,7 @@ use std::ffi::OsStr;
|
|||
pub async fn send<W: AsyncWrite + Unpin>(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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue