Skip to content

Commit 7cb43c4

Browse files
committed
Fix compilation error
1 parent cffc535 commit 7cb43c4

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/dma/cache.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#[cfg(feature = "ptp")]
12
use crate::ptp::Timestamp;
23

34
use super::PacketId;
@@ -52,6 +53,8 @@ impl Cache {
5253
}
5354
}
5455

56+
// NOTE(unused): this function is not used if not(feature = "ptp")
57+
#[allow(unused)]
5558
pub fn id(&self) -> Option<PacketId> {
5659
if self.has_packet_id {
5760
Some(self.packet_id)

src/dma/rx/f_series_descriptor.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,6 @@ impl RxDescriptor {
5252
desc: RawDescriptor::new(),
5353
last: false,
5454
cache: Cache::new(),
55-
#[cfg(not(feature = "ptp"))]
56-
_padding: [0u8; 4],
5755
}
5856
}
5957

0 commit comments

Comments
 (0)