Skip to content

Commit 1dd288a

Browse files
lxsaahCopilot
andauthored
Update aimdb-embassy-adapter/src/error.rs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent f3bd2ec commit 1dd288a

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

aimdb-embassy-adapter/src/error.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -234,9 +234,9 @@ mod tests {
234234

235235
#[test]
236236
fn test_embedded_hal_error_conversions() {
237-
// This test is simplified since we no longer have SPI/I2C HAL error conversions
238-
// We only test nb error conversion functionality
239-
237+
// This test demonstrates practical nb error conversion:
238+
// It converts a nb::Error<DbError> (using a UART hardware error) to a unified hardware error code
239+
// via DbError::from_nb_error, and verifies the result.
240240
// Test nb error conversion with a known error
241241
let known_error = DbError::from_uart_error(0x42);
242242
let nb_other_error: nb::Error<DbError> = nb::Error::Other(known_error);

0 commit comments

Comments
 (0)