From 60cab23ea8d31723b8ff492b2e26b2a9f834434b Mon Sep 17 00:00:00 2001 From: Robert Clipsham Date: Fri, 3 Feb 2023 14:46:29 +0000 Subject: [PATCH] Revert "Add blanket impls of Packet for Box and &T." --- pnet_macros_support/src/packet.rs | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/pnet_macros_support/src/packet.rs b/pnet_macros_support/src/packet.rs index 7abd3248..d29021f5 100644 --- a/pnet_macros_support/src/packet.rs +++ b/pnet_macros_support/src/packet.rs @@ -23,31 +23,6 @@ pub trait Packet { fn payload(&self) -> &[u8]; } -/// Blanket impl for Boxed objects -impl Packet for alloc::boxed::Box { - /// Retrieve the underlying buffer for the packet. - fn packet(&self) -> &[u8] { - self.packet() - } - - /// Retrieve the payload for the packet. - fn payload(&self) -> &[u8] { - self.payload() - } -} - -impl Packet for &T { - /// Retrieve the underlying buffer for the packet. - fn packet(&self) -> &[u8] { - self.packet() - } - - /// Retrieve the payload for the packet. - fn payload(&self) -> &[u8] { - self.payload() - } -} - /// Represents a generic, mutable, network packet. pub trait MutablePacket: Packet { /// Retreive the underlying, mutable, buffer for the packet.