From 6eb6936b5be034df7208087ec018a83be9ebf1a8 Mon Sep 17 00:00:00 2001 From: bit-aloo Date: Wed, 26 Nov 2025 14:56:46 +0530 Subject: [PATCH] return Some(T) and not T in read method Message trait --- .../crates/proc-macro-api/src/legacy_protocol/msg.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/rust-analyzer/crates/proc-macro-api/src/legacy_protocol/msg.rs b/src/tools/rust-analyzer/crates/proc-macro-api/src/legacy_protocol/msg.rs index 1c77863aac34..b0e80dedcde6 100644 --- a/src/tools/rust-analyzer/crates/proc-macro-api/src/legacy_protocol/msg.rs +++ b/src/tools/rust-analyzer/crates/proc-macro-api/src/legacy_protocol/msg.rs @@ -152,7 +152,7 @@ pub trait Message: serde::Serialize + DeserializeOwned { fn read(inp: &mut R, buf: &mut C::Buf) -> io::Result> { Ok(match C::read(inp, buf)? { None => None, - Some(buf) => C::decode(buf)?, + Some(buf) => Some(C::decode(buf)?), }) } fn write(self, out: &mut W) -> io::Result<()> {