We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fe210c2 commit e183799Copy full SHA for e183799
src/codec.rs
@@ -75,7 +75,7 @@ where
75
fn encode(&mut self, item: Output, dst: &mut BytesMut) -> Result<(), Self::Error> {
76
let mut bytes = Vec::new();
77
78
- let len = item.encoded_len().unwrap() as u32;
+ let len = item.encoded_len().map_err(ProtoError::SshEncoding)? as u32;
79
len.encode(&mut bytes).map_err(ProtoError::SshEncoding)?;
80
81
item.encode(&mut bytes).map_err(ProtoError::SshEncoding)?;
0 commit comments