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.
This commit is contained in:
@ -21,7 +21,7 @@ fn main() -> ! {
|
||||
|
||||
let mut bl = BootLoader::default();
|
||||
let start = bl.prepare(&mut SingleFlashConfig::new(&mut BootFlash::<_, 4096>::new(
|
||||
&mut WatchdogFlash::start(Nvmc::new(p.NVMC), p.WDT, 5),
|
||||
WatchdogFlash::start(Nvmc::new(p.NVMC), p.WDT, 5),
|
||||
)));
|
||||
unsafe { bl.load(start) }
|
||||
}
|
||||
|
Reference in New Issue
Block a user