On Thu, 2025-11-20 at 10:45 +0900, Alexandre Courbot wrote:
> It lets you capture both `Imem` variants with a single match arm instead
> of having to remember to use `|`, a pattern that is common in this
> series.
That pattern occurs only once in this series:
let (src_start, dma_start) = match target_mem {
FalconMem::ImemSecure | FalconMem::ImemNonSecure => (
load_offsets.src_start,
fw.dma_handle()
),
FalconMem::Dmem => (
0,
fw.dma_handle_with_offset(load_offsets.src_start.into_safe_cast())?,
),
};
I think this is acceptable, and it reinforces the concept that there are three
different memory
sections. I just don't see how embedding an enum inside another enum is better
than just having
a single enum with three values.
I've renamed the enum values as John suggested, and will post a v2 soon.