From b91db044c9156bb9574f77436666dff15b32b8d2 Mon Sep 17 00:00:00 2001 From: Isabelle L Date: Thu, 14 May 2020 14:55:20 -0500 Subject: [PATCH] add verification right in the read method --- src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib.rs b/src/lib.rs index 3a1efa9..0392379 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -148,6 +148,7 @@ where stream.read(&mut contents).await?; let packet = Packet::from_network(packet_kind, contents, checksum); + packet.verify_integrity()?; Ok(Some(packet)) }