Commit 621b517 1 parent 0a009ca commit 621b517 Copy full SHA for 621b517
File tree 2 files changed +8
-1
lines changed
2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -509,6 +509,9 @@ mod tests {
509
509
510
510
let wire_len = packet. wire_len ( ) ;
511
511
assert_eq ! ( wire_len, buffer. len( ) ) ;
512
+ dbg ! ( wire_len) ;
513
+ let a: Vec < _ > = buffer. iter ( ) . map ( |f| * f as u16 ) . collect ( ) ;
514
+ println ! ( "{:?}" , a) ;
512
515
513
516
let res1 = Packet :: read ( & mut buffer) . unwrap ( ) ;
514
517
@@ -598,9 +601,11 @@ mod tests {
598
601
use crate :: packets:: WireLength ;
599
602
600
603
let mut buffer = Vec :: with_capacity ( 1000 ) ;
601
- packet. async_write ( & mut buffer) . await . unwrap ( ) ;
604
+ let res = packet. async_write ( & mut buffer) . await . unwrap ( ) ;
602
605
603
606
let wire_len = packet. wire_len ( ) ;
607
+
608
+ assert_eq ! ( res, wire_len) ;
604
609
assert_eq ! ( wire_len, buffer. len( ) ) ;
605
610
606
611
let mut buf = buffer. as_slice ( ) ;
Original file line number Diff line number Diff line change @@ -110,6 +110,8 @@ where
110
110
let mut total_written_bytes = 2 ;
111
111
stream. write_u16 ( self . packet_identifier ) . await ?;
112
112
113
+ total_written_bytes += self . properties . async_write ( stream) . await ?;
114
+
113
115
for topic in & self . topics {
114
116
total_written_bytes += topic. async_write ( stream) . await ?;
115
117
}
You can’t perform that action at this time.
0 commit comments