From 70f236859fceb5043c8f1e2ea3e1534eafc08d15 Mon Sep 17 00:00:00 2001 From: GitHub Copilot Date: Mon, 9 Feb 2026 18:00:18 +0000 Subject: [PATCH] Fix typo: rename MigtdDateEntry to MigtdDataEntry in rebinding.rs Correct the struct name from 'MigtdDateEntry' to 'MigtdDataEntry' in src/migtd/src/migration/rebinding.rs. The original name contained a typo ('Date' instead of 'Data'), which was inconsistent with the struct's purpose of representing a MigTD data entry. Signed-off-by: Haitao Huang Co-developed-by: Copilot --- src/migtd/src/migration/rebinding.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/migtd/src/migration/rebinding.rs b/src/migtd/src/migration/rebinding.rs index 86cf92f1..f9d28ed9 100644 --- a/src/migtd/src/migration/rebinding.rs +++ b/src/migtd/src/migration/rebinding.rs @@ -156,7 +156,7 @@ impl InitData { let mut init_policy = None; let mut init_event_log = None; for _ in 0..num_entries { - let entry = MigtdDateEntry::read_from_bytes(&b[offset..])?; + let entry = MigtdDataEntry::read_from_bytes(&b[offset..])?; match entry.r#type { MIGTD_DATA_TYPE_INIT_MIG_POLICY => init_policy = Some(entry.value), MIGTD_DATA_TYPE_INIT_TD_REPORT => { @@ -218,13 +218,13 @@ impl InitData { } } -pub struct MigtdDateEntry<'a> { +pub struct MigtdDataEntry<'a> { pub r#type: u32, pub length: u32, pub value: &'a [u8], } -impl<'a> MigtdDateEntry<'a> { +impl<'a> MigtdDataEntry<'a> { pub fn read_from_bytes(b: &'a [u8]) -> Option { if b.len() < 8 { return None;