change assert == to <= for usize and u64 so we allow 32 bit archs to run

This commit is contained in:
x
2023-01-23 17:38:38 +01:00
parent 6786d5ff82
commit 16111d74de

View File

@@ -170,7 +170,7 @@ pub async fn send_packet<W: AsyncWrite + Unpin + Sized>(
stream.write_all(packet.command.as_bytes()).await?;
debug!(target: "net::message", "sent command: {}", packet.command);
assert_eq!(std::mem::size_of::<usize>(), std::mem::size_of::<u64>());
assert!(std::mem::size_of::<usize>() <= std::mem::size_of::<u64>());
VarInt(packet.payload.len() as u64).encode_async(stream).await?;
if !packet.payload.is_empty() {