mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-12-27 16:07:46 +00:00
return Some(T) and not T in read method Message trait
This commit is contained in:
parent
b5b4abac82
commit
dc04aeac6e
@ -152,7 +152,7 @@ pub trait Message: serde::Serialize + DeserializeOwned {
|
||||
fn read<R: BufRead, C: Codec>(inp: &mut R, buf: &mut C::Buf) -> io::Result<Option<Self>> {
|
||||
Ok(match C::read(inp, buf)? {
|
||||
None => None,
|
||||
Some(buf) => C::decode(buf)?,
|
||||
Some(buf) => Some(C::decode(buf)?),
|
||||
})
|
||||
}
|
||||
fn write<W: Write, C: Codec>(self, out: &mut W) -> io::Result<()> {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user