Skip to content

Commit dc04aea

Browse files
committed
return Some(T) and not T in read method Message trait
1 parent b5b4aba commit dc04aea

File tree

1 file changed

+1
-1
lines changed
  • crates/proc-macro-api/src/legacy_protocol

1 file changed

+1
-1
lines changed

crates/proc-macro-api/src/legacy_protocol/msg.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ pub trait Message: serde::Serialize + DeserializeOwned {
152152
fn read<R: BufRead, C: Codec>(inp: &mut R, buf: &mut C::Buf) -> io::Result<Option<Self>> {
153153
Ok(match C::read(inp, buf)? {
154154
None => None,
155-
Some(buf) => C::decode(buf)?,
155+
Some(buf) => Some(C::decode(buf)?),
156156
})
157157
}
158158
fn write<W: Write, C: Codec>(self, out: &mut W) -> io::Result<()> {

0 commit comments

Comments
 (0)