Unnamed repository; edit this file 'description' to name the repository.
refactor: Simplify by removing ? operator
`out.flush()` already returns a `io::Result<()>`, so there is no need for `?` operator and `Ok(())`
Neil 2025-03-16
parent 220d913 · commit 1e3026c
-rw-r--r--crates/proc-macro-api/src/legacy_protocol/json.rs3
1 files changed, 1 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 ec89f6a9e6..30e35f8f14 100644
--- a/crates/proc-macro-api/src/legacy_protocol/json.rs
+++ b/crates/proc-macro-api/src/legacy_protocol/json.rs
@@ -30,6 +30,5 @@ pub fn write_json(out: &mut impl Write, msg: &str) -> io::Result<()> {
tracing::debug!("> {}", msg);
out.write_all(msg.as_bytes())?;
out.write_all(b"\n")?;
- out.flush()?;
- Ok(())
+ out.flush()
}