This commit is contained in:
asxalex 2024-02-27 15:02:46 +08:00
parent a81f7cd8f9
commit 7c37dd1f9e

View File

@ -51,7 +51,7 @@ impl<'a> Packet<'a> {
tmpsock.v4 = tmp[3..7].try_into().unwrap(); tmpsock.v4 = tmp[3..7].try_into().unwrap();
tmp = &tmp[7..] tmp = &tmp[7..]
} }
other => { _other => {
return Err(SDLanError::NormalError("packet socket family error")); return Err(SDLanError::NormalError("packet socket family error"));
} }
} }
@ -114,7 +114,7 @@ mod test {
use crate::config; use crate::config;
use crate::peer::V6Info; use crate::peer::V6Info;
use crate::utils::Result; use crate::utils::Result;
use crate::{config::AF_INET, packet::*, peer::SdlanSock, utils::gen_uuid}; use crate::{packet::*, peer::SdlanSock, utils::gen_uuid};
#[test] #[test]
fn test_packet_encode_and_decode() -> Result<()> { fn test_packet_encode_and_decode() -> Result<()> {