diff options
| author | Dario Nieuwenhuis <[email protected]> | 2023-11-29 17:23:48 +0100 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2023-11-29 17:26:33 +0100 |
| commit | c6989dfbca51787146f50270c671af9db434f577 (patch) | |
| tree | 5974a8ec41c108d5208e4f68027b918d424a2046 /embassy-boot/boot/src/lib.rs | |
| parent | 384bad7bfaa1f2415baf2cd3b69ebf36dc0a02d7 (diff) | |
Remove nightly and unstable-traits features in preparation for 1.75.
Diffstat (limited to 'embassy-boot/boot/src/lib.rs')
| -rw-r--r-- | embassy-boot/boot/src/lib.rs | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/embassy-boot/boot/src/lib.rs b/embassy-boot/boot/src/lib.rs index 9f0356375..9e70a4dca 100644 --- a/embassy-boot/boot/src/lib.rs +++ b/embassy-boot/boot/src/lib.rs | |||
| @@ -1,6 +1,5 @@ | |||
| 1 | #![cfg_attr(feature = "nightly", feature(async_fn_in_trait))] | ||
| 2 | #![cfg_attr(feature = "nightly", allow(stable_features, unknown_lints, async_fn_in_trait))] | ||
| 3 | #![no_std] | 1 | #![no_std] |
| 2 | #![allow(async_fn_in_trait)] | ||
| 4 | #![warn(missing_docs)] | 3 | #![warn(missing_docs)] |
| 5 | #![doc = include_str!("../README.md")] | 4 | #![doc = include_str!("../README.md")] |
| 6 | mod fmt; | 5 | mod fmt; |
| @@ -18,10 +17,9 @@ mod test_flash; | |||
| 18 | pub(crate) const STATE_ERASE_VALUE: u8 = 0xFF; | 17 | pub(crate) const STATE_ERASE_VALUE: u8 = 0xFF; |
| 19 | pub use boot_loader::{BootError, BootLoader, BootLoaderConfig}; | 18 | pub use boot_loader::{BootError, BootLoader, BootLoaderConfig}; |
| 20 | pub use firmware_updater::{ | 19 | pub use firmware_updater::{ |
| 21 | BlockingFirmwareState, BlockingFirmwareUpdater, FirmwareUpdaterConfig, FirmwareUpdaterError, | 20 | BlockingFirmwareState, BlockingFirmwareUpdater, FirmwareState, FirmwareUpdater, FirmwareUpdaterConfig, |
| 21 | FirmwareUpdaterError, | ||
| 22 | }; | 22 | }; |
| 23 | #[cfg(feature = "nightly")] | ||
| 24 | pub use firmware_updater::{FirmwareState, FirmwareUpdater}; | ||
| 25 | 23 | ||
| 26 | pub(crate) const BOOT_MAGIC: u8 = 0xD0; | 24 | pub(crate) const BOOT_MAGIC: u8 = 0xD0; |
| 27 | pub(crate) const SWAP_MAGIC: u8 = 0xF0; | 25 | pub(crate) const SWAP_MAGIC: u8 = 0xF0; |
| @@ -57,7 +55,6 @@ mod tests { | |||
| 57 | #![allow(unused_imports)] | 55 | #![allow(unused_imports)] |
| 58 | 56 | ||
| 59 | use embedded_storage::nor_flash::{NorFlash, ReadNorFlash}; | 57 | use embedded_storage::nor_flash::{NorFlash, ReadNorFlash}; |
| 60 | #[cfg(feature = "nightly")] | ||
| 61 | use embedded_storage_async::nor_flash::NorFlash as AsyncNorFlash; | 58 | use embedded_storage_async::nor_flash::NorFlash as AsyncNorFlash; |
| 62 | use futures::executor::block_on; | 59 | use futures::executor::block_on; |
| 63 | 60 | ||
| @@ -65,9 +62,7 @@ mod tests { | |||
| 65 | use crate::boot_loader::BootLoaderConfig; | 62 | use crate::boot_loader::BootLoaderConfig; |
| 66 | use crate::firmware_updater::FirmwareUpdaterConfig; | 63 | use crate::firmware_updater::FirmwareUpdaterConfig; |
| 67 | use crate::mem_flash::MemFlash; | 64 | use crate::mem_flash::MemFlash; |
| 68 | #[cfg(feature = "nightly")] | 65 | use crate::test_flash::{AsyncTestFlash, BlockingTestFlash}; |
| 69 | use crate::test_flash::AsyncTestFlash; | ||
| 70 | use crate::test_flash::BlockingTestFlash; | ||
| 71 | 66 | ||
| 72 | /* | 67 | /* |
| 73 | #[test] | 68 | #[test] |
| @@ -105,7 +100,7 @@ mod tests { | |||
| 105 | } | 100 | } |
| 106 | 101 | ||
| 107 | #[test] | 102 | #[test] |
| 108 | #[cfg(all(feature = "nightly", not(feature = "_verify")))] | 103 | #[cfg(not(feature = "_verify"))] |
| 109 | fn test_swap_state() { | 104 | fn test_swap_state() { |
| 110 | const FIRMWARE_SIZE: usize = 57344; | 105 | const FIRMWARE_SIZE: usize = 57344; |
| 111 | let flash = AsyncTestFlash::new(BootLoaderConfig { | 106 | let flash = AsyncTestFlash::new(BootLoaderConfig { |
| @@ -183,7 +178,7 @@ mod tests { | |||
| 183 | } | 178 | } |
| 184 | 179 | ||
| 185 | #[test] | 180 | #[test] |
| 186 | #[cfg(all(feature = "nightly", not(feature = "_verify")))] | 181 | #[cfg(not(feature = "_verify"))] |
| 187 | fn test_swap_state_active_page_biggest() { | 182 | fn test_swap_state_active_page_biggest() { |
| 188 | const FIRMWARE_SIZE: usize = 12288; | 183 | const FIRMWARE_SIZE: usize = 12288; |
| 189 | let flash = AsyncTestFlash::new(BootLoaderConfig { | 184 | let flash = AsyncTestFlash::new(BootLoaderConfig { |
| @@ -228,7 +223,7 @@ mod tests { | |||
| 228 | } | 223 | } |
| 229 | 224 | ||
| 230 | #[test] | 225 | #[test] |
| 231 | #[cfg(all(feature = "nightly", not(feature = "_verify")))] | 226 | #[cfg(not(feature = "_verify"))] |
| 232 | fn test_swap_state_dfu_page_biggest() { | 227 | fn test_swap_state_dfu_page_biggest() { |
| 233 | const FIRMWARE_SIZE: usize = 12288; | 228 | const FIRMWARE_SIZE: usize = 12288; |
| 234 | let flash = AsyncTestFlash::new(BootLoaderConfig { | 229 | let flash = AsyncTestFlash::new(BootLoaderConfig { |
| @@ -272,7 +267,7 @@ mod tests { | |||
| 272 | } | 267 | } |
| 273 | 268 | ||
| 274 | #[test] | 269 | #[test] |
| 275 | #[cfg(all(feature = "nightly", feature = "_verify"))] | 270 | #[cfg(feature = "_verify")] |
| 276 | fn test_verify() { | 271 | fn test_verify() { |
| 277 | // The following key setup is based on: | 272 | // The following key setup is based on: |
| 278 | // https://docs.rs/ed25519-dalek/latest/ed25519_dalek/#example | 273 | // https://docs.rs/ed25519-dalek/latest/ed25519_dalek/#example |
