From 3de542c55d69761b0b22d9984063146888c6fc91 Mon Sep 17 00:00:00 2001 From: Henk Oordt Date: Tue, 9 Jan 2024 11:09:12 +0100 Subject: [PATCH 1/2] Fix compile error with defmt feature enabled --- src/item.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/item.rs b/src/item.rs index 60d3a5d..757361b 100644 --- a/src/item.rs +++ b/src/item.rs @@ -325,7 +325,7 @@ pub fn read_items( #[cfg(feature = "defmt")] defmt::error!( "Found a corrupted item at {:X}. Skipping...", - current_address + address ); ControlFlow::Continue(()) } From adb14105668a8f99fffb54d7dc28a9cc21199ffd Mon Sep 17 00:00:00 2001 From: Henk Oordt Date: Tue, 9 Jan 2024 11:11:09 +0100 Subject: [PATCH 2/2] Fix formatting --- src/item.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/item.rs b/src/item.rs index 757361b..a1ccc22 100644 --- a/src/item.rs +++ b/src/item.rs @@ -323,10 +323,7 @@ pub fn read_items( |flash, header, address| match header.read_item(flash, data_buffer, address, end_address) { Ok(MaybeItem::Corrupted(_, _)) => { #[cfg(feature = "defmt")] - defmt::error!( - "Found a corrupted item at {:X}. Skipping...", - address - ); + defmt::error!("Found a corrupted item at {:X}. Skipping...", address); ControlFlow::Continue(()) } Ok(MaybeItem::Erased(_)) => ControlFlow::Continue(()),