Skip to content

Commit 271b849

Browse files
committed
Improve assert
Improve the assert to ensure we see the value if it is not 0 as expected.
1 parent bf87bb4 commit 271b849

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/packet.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ impl<W: Read + Write> PacketConn<W> {
6969
}
7070

7171
pub fn switch_to_tls(&mut self, config: Arc<ServerConfig>) -> io::Result<()> {
72-
assert!(self.remaining() == 0); // otherwise we've read ahead into the TLS handshake and will be in trouble.
72+
assert_eq!(self.remaining(), 0); // otherwise we've read ahead into the TLS handshake and will be in trouble.
7373

7474
self.rw.switch_to_tls(config)
7575
}

0 commit comments

Comments
 (0)