Sfoglia il codice sorgente

Rename feature `packet-id` -> `packetmeta-id`.

Dario Nieuwenhuis 1 anno fa
parent
commit
efa7897987
3 ha cambiato i file con 5 aggiunte e 5 eliminazioni
  1. 2 2
      Cargo.toml
  2. 1 1
      src/phy/mod.rs
  3. 2 2
      src/socket/udp.rs

+ 2 - 2
Cargo.toml

@@ -63,7 +63,7 @@ defmt = [ "dep:defmt", "heapless/defmt", "heapless/defmt-impl" ]
 "socket-dns" = ["socket", "proto-dns"]
 "socket-mdns" = ["socket-dns"]
 
-"packet-id" = []
+"packetmeta-id" = []
 
 "async" = []
 
@@ -74,7 +74,7 @@ default = [
   "proto-ipv4", "proto-igmp", "proto-dhcpv4", "proto-ipv6", "proto-dns",
   "proto-ipv4-fragmentation", "proto-sixlowpan-fragmentation",
   "socket-raw", "socket-icmp", "socket-udp", "socket-tcp", "socket-dhcpv4", "socket-dns", "socket-mdns",
-  "packet-id", "async"
+  "packetmeta-id", "async"
 ]
 
 # Private features

+ 1 - 1
src/phy/mod.rs

@@ -136,7 +136,7 @@ pub use self::tuntap_interface::TunTapInterface;
 #[derive(Debug, PartialEq, Eq, Hash, Clone, Copy, Default)]
 #[non_exhaustive]
 pub struct PacketMeta {
-    #[cfg(feature = "packet-id")]
+    #[cfg(feature = "packetmeta-id")]
     pub id: Option<u32>,
 }
 

+ 2 - 2
src/socket/udp.rs

@@ -29,10 +29,10 @@ impl<T: Into<IpEndpoint>> From<T> for UdpMetadata {
 
 impl core::fmt::Display for UdpMetadata {
     fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
-        #[cfg(feature = "packet-id")]
+        #[cfg(feature = "packetmeta-id")]
         return write!(f, "{}, PacketID: {:?}", self.endpoint, self.meta);
 
-        #[cfg(not(feature = "packet-id"))]
+        #[cfg(not(feature = "packetmeta-id"))]
         write!(f, "{}", self.endpoint)
     }
 }