Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/proc-macro-api/src/legacy_protocol/json.rs')
-rw-r--r--crates/proc-macro-api/src/legacy_protocol/json.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/proc-macro-api/src/legacy_protocol/json.rs b/crates/proc-macro-api/src/legacy_protocol/json.rs
index c8f774031b..cf8535f77d 100644
--- a/crates/proc-macro-api/src/legacy_protocol/json.rs
+++ b/crates/proc-macro-api/src/legacy_protocol/json.rs
@@ -5,7 +5,7 @@ use std::io::{self, BufRead, Write};
pub fn read_json<'a>(
inp: &mut impl BufRead,
buf: &'a mut String,
-) -> io::Result<Option<&'a String>> {
+) -> io::Result<Option<&'a mut String>> {
loop {
buf.clear();
@@ -28,7 +28,7 @@ pub fn read_json<'a>(
}
/// Writes a JSON message to the output stream.
-pub fn write_json(out: &mut impl Write, msg: &str) -> io::Result<()> {
+pub fn write_json(out: &mut impl Write, msg: &String) -> io::Result<()> {
tracing::debug!("> {}", msg);
out.write_all(msg.as_bytes())?;
out.write_all(b"\n")?;