Skip to content

Commit 4981a80

Browse files
caspermeijnLucioFranco
authored andcommitted
style: Remove duplicate function call (tokio-rs#989)
Co-authored-by: Lucio Franco <luciofranco14@gmail.com> (cherry picked from commit 80f2f7a)
1 parent 4b6c341 commit 4981a80

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/message.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ where
256256
fn encode<B: BufMut + ?Sized>(&self, buf: &mut B) -> Result<(), EncodeError> {
257257
let required = self.encoded_len();
258258
let remaining = buf.remaining_mut();
259-
if required > buf.remaining_mut() {
259+
if required > remaining {
260260
return Err(EncodeError::new(required, remaining));
261261
}
262262

0 commit comments

Comments
 (0)