From 01374c65b262e2f6ec0a06491ad1d3ff16509aa2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1niel=20Buga?= Date: Thu, 7 Nov 2024 15:48:43 +0100 Subject: [PATCH] Fix test warnings --- hil-test/tests/spi_full_duplex.rs | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/hil-test/tests/spi_full_duplex.rs b/hil-test/tests/spi_full_duplex.rs index a4211f71991..2b445303124 100644 --- a/hil-test/tests/spi_full_duplex.rs +++ b/hil-test/tests/spi_full_duplex.rs @@ -497,10 +497,12 @@ mod tests { // Slow down. At 80kHz, the transfer is supposed to take a bit over 3 seconds. // This means that without working cancellation, the test case should // fail. - ctx.spi.apply_config(&Config { - frequency: 80.kHz(), - ..Config::default() - }); + ctx.spi + .apply_config(&Config { + frequency: 80.kHz(), + ..Config::default() + }) + .unwrap(); // Set up a large buffer that would trigger a timeout let dma_rx_buf = DmaRxBuf::new(ctx.rx_descriptors, ctx.rx_buffer).unwrap(); @@ -523,10 +525,12 @@ mod tests { #[timeout(3)] fn can_transmit_after_cancel(mut ctx: Context) { // Slow down. At 80kHz, the transfer is supposed to take a bit over 3 seconds. - ctx.spi.apply_config(&Config { - frequency: 80.kHz(), - ..Config::default() - }); + ctx.spi + .apply_config(&Config { + frequency: 80.kHz(), + ..Config::default() + }) + .unwrap(); // Set up a large buffer that would trigger a timeout let mut dma_rx_buf = DmaRxBuf::new(ctx.rx_descriptors, ctx.rx_buffer).unwrap(); @@ -547,7 +551,8 @@ mod tests { spi.apply_config(&Config { frequency: 10.MHz(), ..Config::default() - }); + }) + .unwrap(); let transfer = spi .transfer(dma_rx_buf, dma_tx_buf)