diff options
| author | Ulf Lilleengen <[email protected]> | 2022-09-20 09:42:40 +0200 |
|---|---|---|
| committer | Ulf Lilleengen <[email protected]> | 2022-09-20 09:54:37 +0200 |
| commit | d0fe654c82b548d65f49213ad50fc2edc5b3d71e (patch) | |
| tree | d6262cf0aa28b85d30459c4148273393aa66492a /examples/boot/bootloader/nrf | |
| parent | 66633902240a70eaf7b2bc6db285884ccdd8182f (diff) | |
Remove BootFlash borrow
Compiler will infer a different lifetime for BootFlash than for the
borrowed flash, which makes it require more type annotations than if it
was just owning the type. Since it doesn't really matter if it owns or
borrows in practical use, change it to own so that it simplifies usage.
Diffstat (limited to 'examples/boot/bootloader/nrf')
| -rw-r--r-- | examples/boot/bootloader/nrf/src/main.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/boot/bootloader/nrf/src/main.rs b/examples/boot/bootloader/nrf/src/main.rs index 9031997c2..8266206b3 100644 --- a/examples/boot/bootloader/nrf/src/main.rs +++ b/examples/boot/bootloader/nrf/src/main.rs | |||
| @@ -21,7 +21,7 @@ fn main() -> ! { | |||
| 21 | 21 | ||
| 22 | let mut bl = BootLoader::default(); | 22 | let mut bl = BootLoader::default(); |
| 23 | let start = bl.prepare(&mut SingleFlashConfig::new(&mut BootFlash::<_, 4096>::new( | 23 | let start = bl.prepare(&mut SingleFlashConfig::new(&mut BootFlash::<_, 4096>::new( |
| 24 | &mut WatchdogFlash::start(Nvmc::new(p.NVMC), p.WDT, 5), | 24 | WatchdogFlash::start(Nvmc::new(p.NVMC), p.WDT, 5), |
| 25 | ))); | 25 | ))); |
| 26 | unsafe { bl.load(start) } | 26 | unsafe { bl.load(start) } |
| 27 | } | 27 | } |
